"getUserNickname" is now "getLoggedInUserNickname"

This commit is contained in:
Michael 2021-08-09 19:48:39 +00:00
commit 15b93b4459
27 changed files with 45 additions and 45 deletions

View 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();
}
}

View 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(),
]);

View 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';

View 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')
]);
}

View 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']) {

View 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>';

View 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
}

View 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' ",

View 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'];