Remove direct calls to App->user

This commit is contained in:
Michael 2021-08-08 10:14:56 +00:00
parent 266ee26240
commit fc283ab928
51 changed files with 238 additions and 166 deletions

View file

@ -109,7 +109,7 @@ class Delegation extends BaseModule
$ret = [];
Hook::callAll('home_init', $ret);
DI::baseUrl()->redirect('profile/' . DI::app()->user['nickname']);
DI::baseUrl()->redirect('profile/' . DI::app()->getNickname());
// 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()->user['nickname']);
$identities[$key]['selected'] = ($identity['nickname'] === DI::app()->getNickname());
$condition = ["`uid` = ? AND `msg` != '' AND NOT (`type` IN (?, ?)) AND NOT `seen`", $identity['uid'], Notification\Type::INTRO, Notification\Type::MAIL];
$params = ['distinct' => true, 'expression' => 'parent'];