diff --git a/advancedcontentfilter/advancedcontentfilter.php b/advancedcontentfilter/advancedcontentfilter.php
index d7af3eee..bd97b309 100644
--- a/advancedcontentfilter/advancedcontentfilter.php
+++ b/advancedcontentfilter/advancedcontentfilter.php
@@ -45,6 +45,7 @@ use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Model\Tag;
+use Friendica\Model\User;
use Friendica\Module\Security\Login;
use Friendica\Network\HTTPException;
use Friendica\Util\DateTimeFormat;
@@ -200,7 +201,9 @@ function advancedcontentfilter_content(App $a)
}
if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'help') {
- $lang = $a->user['language'];
+ $user = User::getById(local_user());
+
+ $lang = $user['language'];
$default_dir = 'addon/advancedcontentfilter/doc/';
$help_file = 'advancedcontentfilter.md';
diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php
index 67ffdd85..593c0e08 100644
--- a/ifttt/ifttt.php
+++ b/ifttt/ifttt.php
@@ -57,7 +57,7 @@ function ifttt_settings(App $a, &$s)
$s .= '
';
$s .= '
' . DI::l10n()->t('Create an account at IFTTT. Create three Facebook recipes that are connected with Maker (In the form "if Facebook then Maker") with the following parameters:') . '
' . DI::l10n()->t('If enabled all your public postings can be posted to the associated GNU Social account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.') . '
';
- if ($a->user['hidewall']) {
+ if ($user['hidewall']) {
$s .= '
' . DI::l10n()->t('Note: Due your privacy settings (Hide your profile details from unknown viewers?) the link potentially included in public postings relayed to GNU Social will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '
';
}
$s .= '
';
diff --git a/twitter/twitter.php b/twitter/twitter.php
index 8bc5940c..b5c9ffbc 100644
--- a/twitter/twitter.php
+++ b/twitter/twitter.php
@@ -146,7 +146,7 @@ function twitter_follow(App $a, array &$contact)
$nickname = preg_replace("=https?://twitter.com/(.*)=ism", "$1", $contact["url"]);
$nickname = str_replace("@twitter.com", "", $nickname);
- $uid = $a->user["uid"];
+ $uid = $a->getLoggedInUserId();
$ckey = DI::config()->get('twitter', 'consumerkey');
$csecret = DI::config()->get('twitter', 'consumersecret');
@@ -266,6 +266,9 @@ function twitter_settings(App $a, &$s)
if (!local_user()) {
return;
}
+
+ $user = User::getById(local_user());
+
DI::page()['htmlhead'] .= '' . "\r\n";
/* * *
* 1) Check that we have global consumer key & secret
@@ -356,7 +359,7 @@ function twitter_settings(App $a, &$s)
$s .= Renderer::replaceMacros($field_checkbox, [
'$field' => ['twitter-enable', DI::l10n()->t('Allow posting to Twitter'), $enabled, DI::l10n()->t('If enabled all your public postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.')]
]);
- if ($a->user['hidewall']) {
+ if ($user['hidewall']) {
$s .= '
' . DI::l10n()->t('Note: Due to your privacy settings (Hide your profile details from unknown viewers?) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '