mirror of
https://github.com/friendica/friendica
synced 2025-04-22 02:30:11 +00:00
"getUserNickname" is now "getLoggedInUserNickname"
This commit is contained in:
parent
27177f19c9
commit
15b93b4459
27 changed files with 45 additions and 45 deletions
|
@ -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'];
|
||||
|
|
|
@ -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'];
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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()]);
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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>'
|
||||
),
|
||||
]);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue