"getUserNickname" is now "getLoggedInUserNickname"

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

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

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

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