diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-16 13:27:45 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-16 18:39:11 +0100 |
commit | 55532f19d90b40f7f46354b92a5322676729ba7e (patch) | |
tree | c29ee88dbb789c7c0aa9c9f1c08fccef27272d7f /settings | |
parent | a159d7c28c483a2b77e2f533795f6d6d1ec720fd (diff) | |
download | nextcloud-server-55532f19d90b40f7f46354b92a5322676729ba7e.tar.gz nextcloud-server-55532f19d90b40f7f46354b92a5322676729ba7e.zip |
Cleanup OC_User and OCP\User
* mainly removes deprecated methods and old static code
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/users.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/settings/users.php b/settings/users.php index 20b9e21d58e..03523fc5305 100644 --- a/settings/users.php +++ b/settings/users.php @@ -62,12 +62,17 @@ if ($config->getSystemValue('sort_groups_by_name', false)) { } } -$isAdmin = OC_User::isAdminUser(OC_User::getUser()); +$uid = \OC_User::getUser(); +$isAdmin = OC_User::isAdminUser($uid); -$isDisabled = !OC_User::isEnabled(OC_User::getUser()); +$isDisabled = true; +$user = $userManager->get($uid); +if ($user) { + $isDisabled = !$user->isEnabled(); +} $groupsInfo = new \OC\Group\MetaData( - OC_User::getUser(), + $uid, $isAdmin, $groupManager, \OC::$server->getUserSession() |