Get rid of App->user completely

This commit is contained in:
Michael 2021-08-08 19:30:21 +00:00
parent fc283ab928
commit 28090bd793
39 changed files with 158 additions and 234 deletions

View file

@ -128,18 +128,7 @@ class Community extends BaseModule
// We need the editor here to be able to reshare an item.
if (Session::isAuthenticated()) {
$x = [
'is_owner' => true,
'allow_location' => DI::app()->getUserValue('allow_location'),
'default_location' => DI::app()->getUserValue('default-location'),
'nickname' => DI::app()->getNickname(),
'lockstate' => ACL::getLockstateForUserId(DI::app()->getUserId()) ? 'lock' : 'unlock',
'acl' => ACL::getFullSelectorHTML(DI::page(), DI::app()->user, true),
'bang' => '',
'visitor' => 'block',
'profile_uid' => local_user(),
];
$o .= status_editor(DI::app(), $x, 0, true);
$o .= status_editor(DI::app(), [], 0, true);
}
}

View file

@ -139,16 +139,9 @@ class Network extends BaseModule
}
$x = [
'is_owner' => true,
'allow_location' => $a->getUserValue('allow_location'),
'default_location' => $a->getUserValue('default-location'),
'nickname' => $a->getNickname(),
'lockstate' => self::$groupId || self::$forumContactId || self::$network || ACL::getLockstateForUserId($a->getUserId()) ? 'lock' : 'unlock',
'default_perms' => ACL::getDefaultUserPermissions($a->user),
'acl' => ACL::getFullSelectorHTML(DI::page(), $a->user, true, $default_permissions),
'acl' => ACL::getFullSelectorHTML(DI::page(), $a->getUserId(), true, $default_permissions),
'bang' => ((self::$groupId || self::$forumContactId || self::$network) ? '!' : ''),
'visitor' => 'block',
'profile_uid' => local_user(),
'content' => $content,
];