]> git.mxchange.org Git - friendica.git/commitdiff
"getUserNickname" is now "getLoggedInUserNickname"
authorMichael <heluecht@pirati.ca>
Mon, 9 Aug 2021 19:48:39 +0000 (19:48 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 9 Aug 2021 19:48:39 +0000 (19:48 +0000)
27 files changed:
include/api.php
mod/display.php
mod/editpost.php
mod/events.php
mod/fbrowser.php
mod/message.php
mod/notes.php
mod/photos.php
mod/ping.php
mod/settings.php
src/App.php
src/App/Page.php
src/BaseModule.php
src/Content/Nav.php
src/Factory/Notification/Introduction.php
src/Model/Mail.php
src/Module/Delegation.php
src/Module/HCard.php
src/Module/Home.php
src/Module/Invite.php
src/Module/NoScrape.php
src/Module/Profile/Schedule.php
src/Module/Settings/Profile/Photo/Crop.php
src/Module/Settings/Profile/Photo/Index.php
src/Module/Settings/UserExport.php
src/Object/EMail/ItemCCEMail.php
view/theme/vier/theme.php

index 7b649da7df80530aa4e423e092bd8e86a9e1d6dc..e0cac831e5644b7fe492e5b55fde4de4402cd43a 100644 (file)
@@ -322,7 +322,7 @@ function api_call(App $a, App\Arguments $args = null)
 
                                if (!empty($info['auth']) && api_user() === false) {
                                        api_login($a);
-                                       Logger::info(API_LOG_PREFIX . 'nickname {nickname}', ['module' => 'api', 'action' => 'call', 'nickname' => $a->getUserNickname()]);
+                                       Logger::info(API_LOG_PREFIX . 'nickname {nickname}', ['module' => 'api', 'action' => 'call', 'nickname' => $a->getLoggedInUserNickname()]);
                                }
 
                                Logger::debug(API_LOG_PREFIX . 'parameters', ['module' => 'api', 'action' => 'call', 'parameters' => $_REQUEST]);
index 7ac4f38ce836cd7a8ee1621cc51c453d4a736708..5e24bd4b43d26981d4c32dd04ebd59416058760b 100644 (file)
@@ -62,7 +62,7 @@ function display_init(App $a)
                if (local_user()) {
                        $item = Post::selectFirstForUser(local_user(), $fields, ['guid' => DI::args()->getArgv()[1], 'uid' => local_user()]);
                        if (DBA::isResult($item)) {
-                               $nick = $a->getUserNickname();
+                               $nick = $a->getLoggedInUserNickname();
                        }
                }
 
index e522522e3d5b9d6438474b859b0ba26313c80f13..cc72dbd3c2eddbd864b28250254b6467d96ce32d 100644 (file)
@@ -68,7 +68,7 @@ function editpost_content(App $a)
        DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
                '$ispublic' => '&nbsp;', // DI::l10n()->t('Visible to <strong>everybody</strong>'),
                '$geotag' => $geotag,
-               '$nickname' => $a->getUserNickname(),
+               '$nickname' => $a->getLoggedInUserNickname(),
                '$is_mobile' => DI::mode()->isMobile(),
        ]);
 
index 25a937632510150ef74c5b4cfa63f26ec058f63c..e7c3ed36f12ad033eabdfb39659feb9f04fe9bc0 100644 (file)
@@ -280,7 +280,7 @@ function events_content(App $a)
        $tabs = '';
        // tabs
        if ($a->getThemeInfoValue('events_in_profile')) {
-               $tabs = BaseProfile::getTabsHTML($a, 'events', true, $a->getUserNickname(), false);
+               $tabs = BaseProfile::getTabsHTML($a, 'events', true, $a->getLoggedInUserNickname(), false);
        }
 
        $mode = 'view';
index 5d086e0bf878a76eddb4f8dc4810c34d7b0e99a9..53aa255a2ea89a4a6e9ed390eaa88a125d9fcc5a 100644 (file)
@@ -88,7 +88,7 @@ function fbrowser_content(App $a)
                                }
 
                                return [
-                                       DI::baseUrl() . '/photos/' . $a->getUserNickname() . '/image/' . $rr['resource-id'],
+                                       DI::baseUrl() . '/photos/' . $a->getLoggedInUserNickname() . '/image/' . $rr['resource-id'],
                                        $filename_e,
                                        DI::baseUrl() . '/photo/' . $rr['resource-id'] . '-' . $scale . '.'. $ext
                                ];
@@ -103,7 +103,7 @@ function fbrowser_content(App $a)
                                '$folders'  => $albums,
                                '$files'    => $files,
                                '$cancel'   => DI::l10n()->t('Cancel'),
-                               '$nickname' => $a->getUserNickname(),
+                               '$nickname' => $a->getLoggedInUserNickname(),
                                '$upload'   => DI::l10n()->t('Upload')
                        ]);
 
@@ -132,7 +132,7 @@ function fbrowser_content(App $a)
                                        '$folders'  => false,
                                        '$files'    => $files,
                                        '$cancel'   => DI::l10n()->t('Cancel'),
-                                       '$nickname' => $a->getUserNickname(),
+                                       '$nickname' => $a->getLoggedInUserNickname(),
                                        '$upload'   => DI::l10n()->t('Upload')
                                ]);
                        }
index c8e5f4290410658c144d8e5a412832644a219ce8..2f4fe0c1aaf47047110d68b995469e62a534803d 100644 (file)
@@ -112,7 +112,7 @@ function message_content(App $a)
                return Login::form();
        }
 
-       $myprofile = DI::baseUrl() . '/profile/' . $a->getUserNickname();
+       $myprofile = DI::baseUrl() . '/profile/' . $a->getLoggedInUserNickname();
 
        $tpl = Renderer::getMarkupTemplate('mail_head.tpl');
        if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'new') {
@@ -179,7 +179,7 @@ function message_content(App $a)
                $tpl = Renderer::getMarkupTemplate('msg-header.tpl');
                DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
                        '$baseurl' => DI::baseUrl()->get(true),
-                       '$nickname' => $a->getUserNickname(),
+                       '$nickname' => $a->getLoggedInUserNickname(),
                        '$linkurl' => DI::l10n()->t('Please enter a link URL:')
                ]);
 
@@ -292,7 +292,7 @@ function message_content(App $a)
                $tpl = Renderer::getMarkupTemplate('msg-header.tpl');
                DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
                        '$baseurl' => DI::baseUrl()->get(true),
-                       '$nickname' => $a->getUserNickname(),
+                       '$nickname' => $a->getLoggedInUserNickname(),
                        '$linkurl' => DI::l10n()->t('Please enter a link URL:')
                ]);
 
@@ -431,7 +431,7 @@ function render_messages(array $msg, $t)
        $tpl = Renderer::getMarkupTemplate($t);
        $rslt = '';
 
-       $myprofile = DI::baseUrl() . '/profile/' . $a->getUserNickname();
+       $myprofile = DI::baseUrl() . '/profile/' . $a->getLoggedInUserNickname();
 
        foreach ($msg as $rr) {
                if ($rr['unknown']) {
index 1c160a2f2e3120005eb455042e2a291e8d3da062..11ec8a035230b6005351c6466a052eb7155103c0 100644 (file)
@@ -45,7 +45,7 @@ function notes_content(App $a, $update = false)
                return;
        }
 
-       $o = BaseProfile::getTabsHTML($a, 'notes', true, $a->getUserNickname(), false);
+       $o = BaseProfile::getTabsHTML($a, 'notes', true, $a->getLoggedInUserNickname(), false);
 
        if (!$update) {
                $o .= '<h3>' . DI::l10n()->t('Personal Notes') . '</h3>';
index f90a9f3bfc5b121b627729d8f7755b1db6042911..1379ed12e6c7f763e39a9a07a11b825b28cd1cfd 100644 (file)
@@ -224,7 +224,7 @@ function photos_post(App $a)
                        // Update the photo albums cache
                        Photo::clearAlbumCache($page_owner_uid);
 
-                       DI::baseUrl()->redirect('photos/' . $a->getUserNickname() . '/album/' . bin2hex($newalbum));
+                       DI::baseUrl()->redirect('photos/' . $a->getLoggedInUserNickname() . '/album/' . bin2hex($newalbum));
                        return; // NOTREACHED
                }
 
index 14331b2e7711558ea62a06cd7b1d41889e0afa42..bdd30be3fc10100679884a1803df353fb2a8d1c6 100644 (file)
@@ -193,7 +193,7 @@ function ping_init(App $a)
                $intro_count = count($intros1) + count($intros2);
                $intros = $intros1 + $intros2;
 
-               $myurl = DI::baseUrl() . '/profile/' . $a->getUserNickname();
+               $myurl = DI::baseUrl() . '/profile/' . $a->getLoggedInUserNickname();
                $mails = q(
                        "SELECT `id`, `from-name`, `from-url`, `from-photo`, `created` FROM `mail`
                        WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ",
index 5ad884e883c4a980302ee27026964206c5b375c3..378e25ed9f7fd3d38c98f01a6a01bff3fec9003e 100644 (file)
@@ -594,7 +594,7 @@ function settings_content(App $a)
 
        $username   = $user['username'];
        $email      = $user['email'];
-       $nickname   = $a->getUserNickname();
+       $nickname   = $a->getLoggedInUserNickname();
        $timezone   = $user['timezone'];
        $language   = $user['language'];
        $notify     = $user['notify-flags'];
index ff8c059dec76b0712d58090427c9c0ee4bede408..3a952c7a338c7ba7f43b7994adf7325f694ce43f 100644 (file)
@@ -166,7 +166,7 @@ class App
         * Fetch the user nick name
         * @return string
         */
-       public function getUserNickname()
+       public function getLoggedInUserNickname()
        {
                return $this->nickname;
        }
index 75107df6da43b312917c2ef817b6223b782ad620..766dd4ebef59dc4fa9ed1a59656778bf5e8480ed 100644 (file)
@@ -277,8 +277,8 @@ class Page implements ArrayAccess
                // If you're just visiting, let javascript take you home
                if (!empty($_SESSION['visitor_home'])) {
                        $homebase = $_SESSION['visitor_home'];
-               } elseif (!empty($app->getUserNickname())) {
-                       $homebase = 'profile/' . $app->getUserNickname();
+               } elseif (!empty($app->getLoggedInUserNickname())) {
+                       $homebase = 'profile/' . $app->getLoggedInUserNickname();
                }
 
                if (isset($homebase)) {
index 28cce09e0757efb2b67637d58d3a9cd6d042c42b..b812370fdf0d5b35f335d0e47005f148b23620fb 100644 (file)
@@ -183,7 +183,7 @@ abstract class BaseModule
        public static function checkFormSecurityTokenRedirectOnError($err_redirect, $typename = '', $formname = 'form_security_token')
        {
                if (!self::checkFormSecurityToken($typename, $formname)) {
-                       Logger::log('checkFormSecurityToken failed: user ' . DI::app()->getUserNickname() . ' - form element ' . $typename);
+                       Logger::log('checkFormSecurityToken failed: user ' . DI::app()->getLoggedInUserNickname() . ' - form element ' . $typename);
                        Logger::log('checkFormSecurityToken failed: _REQUEST data: ' . print_r($_REQUEST, true), Logger::DATA);
                        notice(self::getFormSecurityStandardErrorMessage());
                        DI::baseUrl()->redirect($err_redirect);
@@ -193,7 +193,7 @@ abstract class BaseModule
        public static function checkFormSecurityTokenForbiddenOnError($typename = '', $formname = 'form_security_token')
        {
                if (!self::checkFormSecurityToken($typename, $formname)) {
-                       Logger::log('checkFormSecurityToken failed: user ' . DI::app()->getUserNickname() . ' - form element ' . $typename);
+                       Logger::log('checkFormSecurityToken failed: user ' . DI::app()->getLoggedInUserNickname() . ' - form element ' . $typename);
                        Logger::log('checkFormSecurityToken failed: _REQUEST data: ' . print_r($_REQUEST, true), Logger::DATA);
 
                        throw new \Friendica\Network\HTTPException\ForbiddenException();
index 4ed25cdad5e51c36a5f549da300195138ea979da..56049fa16e2bfdc823f9013f0d3c82296b58b76f 100644 (file)
@@ -154,7 +154,7 @@ class Nav
                 * Display the current site location as a navigation aid.
                 */
 
-               $myident = !empty($a->getUserNickname()) ? $a->getUserNickname() . '@' : '';
+               $myident = !empty($a->getLoggedInUserNickname()) ? $a->getLoggedInUserNickname() . '@' : '';
 
                $sitelocation = $myident . substr(DI::baseUrl()->get($ssl_state), strpos(DI::baseUrl()->get($ssl_state), '//') + 2);
 
@@ -187,10 +187,10 @@ class Nav
 
                if ($a->isLoggedIn()) {
                        // user menu
-                       $nav['usermenu'][] = ['profile/' . $a->getUserNickname(), DI::l10n()->t('Status'), '', DI::l10n()->t('Your posts and conversations')];
-                       $nav['usermenu'][] = ['profile/' . $a->getUserNickname() . '/profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')];
-                       $nav['usermenu'][] = ['photos/' . $a->getUserNickname(), DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')];
-                       $nav['usermenu'][] = ['videos/' . $a->getUserNickname(), DI::l10n()->t('Videos'), '', DI::l10n()->t('Your videos')];
+                       $nav['usermenu'][] = ['profile/' . $a->getLoggedInUserNickname(), DI::l10n()->t('Status'), '', DI::l10n()->t('Your posts and conversations')];
+                       $nav['usermenu'][] = ['profile/' . $a->getLoggedInUserNickname() . '/profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')];
+                       $nav['usermenu'][] = ['photos/' . $a->getLoggedInUserNickname(), DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')];
+                       $nav['usermenu'][] = ['videos/' . $a->getLoggedInUserNickname(), DI::l10n()->t('Videos'), '', DI::l10n()->t('Your videos')];
                        $nav['usermenu'][] = ['events/', DI::l10n()->t('Events'), '', DI::l10n()->t('Your events')];
                        $nav['usermenu'][] = ['notes/', DI::l10n()->t('Personal notes'), '', DI::l10n()->t('Your personal notes')];
 
@@ -267,10 +267,10 @@ class Nav
                }
 
                // The following nav links are only show to logged in users
-               if (local_user() && !empty($a->getUserNickname())) {
+               if (local_user() && !empty($a->getLoggedInUserNickname())) {
                        $nav['network'] = ['network', DI::l10n()->t('Network'), '', DI::l10n()->t('Conversations from your friends')];
 
-                       $nav['home'] = ['profile/' . $a->getUserNickname(), DI::l10n()->t('Home'), '', DI::l10n()->t('Your posts and conversations')];
+                       $nav['home'] = ['profile/' . $a->getLoggedInUserNickname(), DI::l10n()->t('Home'), '', DI::l10n()->t('Your posts and conversations')];
 
                        // Don't show notifications for public communities
                        if (Session::get('page_flags', '') != User::PAGE_FLAGS_COMMUNITY) {
index a153e5a5665a33d0a190e76648c9234861cca4b6..2b5aecdb00ba6122244ae90c627a050f0f8c1368 100644 (file)
@@ -68,7 +68,7 @@ class Introduction extends BaseFactory
                $this->l10n         = $l10n;
                $this->pConfig      = $pConfig;
                $this->session      = $session;
-               $this->nick         = $app->getUserNickname() ?? '';
+               $this->nick         = $app->getLoggedInUserNickname() ?? '';
        }
 
        /**
index 7b18ac3c3144f8507150d9af63a2d0336fec6335..7eaeb09b5e6ba85b6866a84bd8f56f0c13869f37 100644 (file)
@@ -173,7 +173,7 @@ class Mail
                        $recip_host = substr($recip_host, 0, strpos($recip_host, '/'));
 
                        $recip_handle = (($contact['addr']) ? $contact['addr'] : $contact['nick'] . '@' . $recip_host);
-                       $sender_handle = $a->getUserNickname() . '@' . substr(DI::baseUrl(), strpos(DI::baseUrl(), '://') + 3);
+                       $sender_handle = $a->getLoggedInUserNickname() . '@' . substr(DI::baseUrl(), strpos(DI::baseUrl(), '://') + 3);
 
                        $conv_guid = System::createUUID();
                        $convuri = $recip_handle . ':' . $conv_guid;
index ac662ecbd090d97c7ed25960f9bdee3dd69fe396..cd3f50f59f098eeb66c076b6210e12a47ee2b311 100644 (file)
@@ -109,7 +109,7 @@ class Delegation extends BaseModule
                $ret = [];
                Hook::callAll('home_init', $ret);
 
-               DI::baseUrl()->redirect('profile/' . DI::app()->getUserNickname());
+               DI::baseUrl()->redirect('profile/' . DI::app()->getLoggedInUserNickname());
                // NOTREACHED
        }
 
@@ -130,7 +130,7 @@ class Delegation extends BaseModule
 
                        $identities[$key]['thumb'] = Contact::getAvatarUrlForId($self['id'], Proxy::SIZE_THUMB, $self['updated']);
 
-                       $identities[$key]['selected'] = ($identity['nickname'] === DI::app()->getUserNickname());
+                       $identities[$key]['selected'] = ($identity['nickname'] === DI::app()->getLoggedInUserNickname());
 
                        $condition = ["`uid` = ? AND `msg` != '' AND NOT (`type` IN (?, ?)) AND NOT `seen`", $identity['uid'], Notification\Type::INTRO, Notification\Type::MAIL];
                        $params = ['distinct' => true, 'expression' => 'parent'];
index c43e3975c3801039616cbd11b5090e8cea6b16a3..3310749bc33e930c2959238871bb78bab02f0c84 100644 (file)
@@ -40,7 +40,7 @@ class HCard extends BaseModule
 
                if ((local_user()) && ($parameters['action'] ?? '') === 'view') {
                        // A logged in user views a profile of a user
-                       $nickname = $a->getUserNickname();
+                       $nickname = $a->getLoggedInUserNickname();
                } elseif (empty($parameters['action'])) {
                        // Show the profile hCard
                        $nickname = $parameters['profile'];
index 76c4736cf1758c9b0401f83042c31ebb6bb7f4c4..9d16e11aa7f6eb6c457c9377b4790fe707db9a6b 100644 (file)
@@ -42,7 +42,7 @@ class Home extends BaseModule
 
                Hook::callAll('home_init', $ret);
 
-               if (local_user() && ($app->getUserNickname())) {
+               if (local_user() && ($app->getLoggedInUserNickname())) {
                        DI::baseUrl()->redirect('network');
                }
 
index 48926a1fbff841f5c574a54bfca382e66ff5a9af..82b8c604a900939319dd5a718a8ee8c493b4ae0c 100644 (file)
@@ -171,7 +171,7 @@ class Invite extends BaseModule
                                DI::l10n()->t('You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web.') . "\r\n" . "\r\n"
                                . $linkTxt
                                . "\r\n" . "\r\n" . (($inviteOnly) ? DI::l10n()->t('You will need to supply this invitation code: $invite_code') . "\r\n" . "\r\n" : '') . DI::l10n()->t('Once you have registered, please connect with me via my profile page at:')
-                               . "\r\n" . "\r\n" . DI::baseUrl()->get() . '/profile/' . $app->getUserNickname()
+                               . "\r\n" . "\r\n" . DI::baseUrl()->get() . '/profile/' . $app->getLoggedInUserNickname()
                                . "\r\n" . "\r\n" . DI::l10n()->t('For more information about the Friendica project and why we feel it is important, please visit http://friendi.ca') . "\r\n" . "\r\n",
                        ],
                        '$submit'              => DI::l10n()->t('Submit')
index f293e26b1e0d940e61667cb60e813fbd2b5aba25..f156efb44f17f66d6b742b859a97cff05c6fb7a8 100644 (file)
@@ -45,7 +45,7 @@ class NoScrape extends BaseModule
                        $which = $parameters['nick'];
                } elseif (local_user() && isset($parameters['profile']) && DI::args()->get(2) == 'view') {
                        // view infos about a known profile (needs a login)
-                       $which = $a->getUserNickname();
+                       $which = $a->getLoggedInUserNickname();
                } else {
                        System::jsonError(403, 'Authentication required');
                }
index ee468f8157eabcfdfdc341e774200374f0b6b83e..e72b1c7a656191cd15abce4d003bd3949570189c 100644 (file)
@@ -58,7 +58,7 @@ class Schedule extends BaseProfile
 
                $a = DI::app();
 
-               $o = self::getTabsHTML($a, 'schedule', true, $a->getUserNickname(), false);
+               $o = self::getTabsHTML($a, 'schedule', true, $a->getLoggedInUserNickname(), false);
 
                $schedule = [];
                $delayed = DBA::select('delayed-post', [], ['uid' => local_user()]);
index d6c89e237bce7d7c00539124295fd21da175dae7..83722c8661bf4417710eb0c744a8839193222fb9 100644 (file)
@@ -56,7 +56,7 @@ class Crop extends BaseSettings
                $selectionW = intval($_POST['width']  ?? 0);
                $selectionH = intval($_POST['height'] ?? 0);
 
-               $path = 'profile/' . DI::app()->getUserNickname();
+               $path = 'profile/' . DI::app()->getLoggedInUserNickname();
 
                $base_image = Photo::selectFirst([], ['resource-id' => $resource_id, 'uid' => local_user(), 'scale' => $scale]);
                if (DBA::isResult($base_image)) {
@@ -184,7 +184,7 @@ class Crop extends BaseSettings
 
                        info(DI::l10n()->t('Profile picture successfully updated.'));
 
-                       DI::baseUrl()->redirect('profile/' . DI::app()->getUserNickname());
+                       DI::baseUrl()->redirect('profile/' . DI::app()->getLoggedInUserNickname());
                }
 
                $Image = Photo::getImageForPhoto($photos[0]);
index 3b4d33a01bef31abf96232fc197e85612400fd57..1584fe8f632ec4e4dc4032141902036db7dba0ae 100644 (file)
@@ -133,7 +133,7 @@ class Index extends BaseSettings
                                DI::l10n()->t('or'),
                                ($newuser) ?
                                        '<a href="' . DI::baseUrl() . '">' . DI::l10n()->t('skip this step') . '</a>'
-                                       : '<a href="' . DI::baseUrl() . '/photos/' . DI::app()->getUserNickname() . '">'
+                                       : '<a href="' . DI::baseUrl() . '/photos/' . DI::app()->getLoggedInUserNickname() . '">'
                                                . DI::l10n()->t('select a photo from your photo albums') . '</a>'
                        ),
                ]);
index fe3dd26905cd620f933af4681fc7182c035f5875..03519b11306f02f4d44d30d2ace74f5144905cdc 100644 (file)
@@ -100,17 +100,17 @@ class UserExport extends BaseSettings
                        switch ($action) {
                                case "backup":
                                        header("Content-type: application/json");
-                                       header('Content-Disposition: attachment; filename="' . DI::app()->getUserNickname() . '.' . $action . '"');
+                                       header('Content-Disposition: attachment; filename="' . DI::app()->getLoggedInUserNickname() . '.' . $action . '"');
                                        self::exportAll(local_user());
                                        break;
                                case "account":
                                        header("Content-type: application/json");
-                                       header('Content-Disposition: attachment; filename="' . DI::app()->getUserNickname() . '.' . $action . '"');
+                                       header('Content-Disposition: attachment; filename="' . DI::app()->getLoggedInUserNickname() . '.' . $action . '"');
                                        self::exportAccount(local_user());
                                        break;
                                case "contact":
                                        header("Content-type: application/csv");
-                                       header('Content-Disposition: attachment; filename="' . DI::app()->getUserNickname() . '-contacts.csv' . '"');
+                                       header('Content-Disposition: attachment; filename="' . DI::app()->getLoggedInUserNickname() . '-contacts.csv' . '"');
                                        self::exportContactsAsCSV(local_user());
                                        break;
                        }
index ddaf7660805afff24076d64b00a762a02d7189ba..1fa2e94d773b1b131e384cb8dd10875d368f7f3d 100644 (file)
@@ -41,14 +41,14 @@ class ItemCCEMail extends Email
 
                $disclaimer = '<hr />' . $l10n->t('This message was sent to you by %s, a member of the Friendica social network.', $user['username'])
                              . '<br />';
-               $disclaimer .= $l10n->t('You may visit them online at %s', $baseUrl . '/profile/' . $a->getUserNickname()) . EOL;
+               $disclaimer .= $l10n->t('You may visit them online at %s', $baseUrl . '/profile/' . $a->getLoggedInUserNickname()) . EOL;
                $disclaimer .= $l10n->t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL;
                if (!$item['title'] == '') {
                        $subject = EmailProtocol::encodeHeader($item['title'], 'UTF-8');
                } else {
                        $subject = EmailProtocol::encodeHeader('[Friendica]' . ' ' . $l10n->t('%s posted an update.', $user['username']), 'UTF-8');
                }
-               $link    = '<a href="' . $baseUrl . '/profile/' . $a->getUserNickname() . '"><img src="' . $authorThumb . '" alt="' . $user['username'] . '" /></a><br /><br />';
+               $link    = '<a href="' . $baseUrl . '/profile/' . $a->getLoggedInUserNickname() . '"><img src="' . $authorThumb . '" alt="' . $user['username'] . '" /></a><br /><br />';
                $html    = Item::prepareBody($item);
                $message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';;
 
index c810aff1cbc9d9fabb53bb5b49b9d11a17e5bc24..e357f2c043ec4877d7a58d1f913a5fbd8280ed15 100644 (file)
@@ -27,7 +27,7 @@ function vier_init(App $a)
 
        $args = DI::args();
 
-       if ($args->get(0) === 'profile' && $args->get(1) === ($a->getUserNickname() ?? '') || $args->get(0) === 'network' && local_user()
+       if ($args->get(0) === 'profile' && $args->get(1) === ($a->getLoggedInUserNickname() ?? '') || $args->get(0) === 'network' && local_user()
        ) {
                vier_community_info();