Replaced direct calls to App->user #1152

Merged
annando merged 5 commits from app-user into develop 2021-08-09 23:00:24 +02:00
4 changed files with 4 additions and 4 deletions
Showing only changes of commit 08c64387d7 - Show all commits

View file

@ -57,7 +57,7 @@ function ifttt_settings(App $a, &$s)
$s .= '<div id="ifttt-configuration-wrapper">';
$s .= '<p>' . DI::l10n()->t('Create an account at <a href="http://www.ifttt.com">IFTTT</a>. Create three Facebook recipes that are connected with <a href="https://ifttt.com/maker">Maker</a> (In the form "if Facebook then Maker") with the following parameters:') . '</p>';
$s .= '<h4>URL</h4>';
$s .= '<p>' . DI::baseUrl()->get() . '/ifttt/' . $a->getUserNickname() . '</p>';
$s .= '<p>' . DI::baseUrl()->get() . '/ifttt/' . $a->getLoggedInUserNickname() . '</p>';
$s .= '<h4>Method</h4>';
$s .= '<p>POST</p>';
$s .= '<h4>Content Type</h4>';

View file

@ -283,7 +283,7 @@ function jappixmini_settings(App $a, &$s)
}
if (($username == "") && DI::config()->get("jappixmini", "default_user")) {
$username = $a->getUserNickname();
$username = $a->getLoggedInUserNickname();
}
$info_text = DI::config()->get("jappixmini", "infotext");

View file

@ -105,7 +105,7 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data)
// Never filter own messages
// TODO: find a better way to extract this
$logged_user_profile = DI::baseUrl()->get() . '/profile/' . $a->getUserNickname();
$logged_user_profile = DI::baseUrl()->get() . '/profile/' . $a->getLoggedInUserNickname();
if ($logged_user_profile == $hook_data['item']['author-link']) {
return;
}

View file

@ -153,7 +153,7 @@ function xmpp_converse(App $a)
DI::pConfig()->set(local_user(), "xmpp", "password", $password);
}
$jid = $a->getUserNickname() . "@" . DI::baseUrl()->getHostname() . "/converse-" . Strings::getRandomHex(5);
$jid = $a->getLoggedInUserNickname() . "@" . DI::baseUrl()->getHostname() . "/converse-" . Strings::getRandomHex(5);
$auto_login = "auto_login: true,
authentication: 'login',