summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
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()