summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-17 05:33:07 +0100
committerGitHub <noreply@github.com>2018-01-17 05:33:07 +0100
commit0b464e527489488ed058cc80f6bb93e086eec681 (patch)
treed2d0002f3a86221a09cb8373fa382af5c807a7a9 /settings
parentca2904a01778eab0bb595700d01df075bb4cf92f (diff)
parent55532f19d90b40f7f46354b92a5322676729ba7e (diff)
downloadnextcloud-server-0b464e527489488ed058cc80f6bb93e086eec681.tar.gz
nextcloud-server-0b464e527489488ed058cc80f6bb93e086eec681.zip
Merge pull request #7884 from nextcloud/cleanup-oc_user
Cleanup OC_User and OCP\User
Diffstat (limited to 'settings')
-rw-r--r--settings/users.php11
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()