Use UID instead of login name
Login name can be something different and thus I'm pretty sure this will break in combination with external auth providers such as LDAP.
This commit is contained in:
parent
5aad902507
commit
d712c27fe1
|
@ -25,7 +25,7 @@ OC_JSON::checkSubAdminUser();
|
|||
|
||||
$userCount = 0;
|
||||
|
||||
$currentUser = \OC::$server->getUserSession()->getLoginName();
|
||||
$currentUser = \OC::$server->getUserSession()->getUser()->getUID();
|
||||
|
||||
if (!OC_User::isAdminUser($currentUser)) {
|
||||
$groups = OC_SubAdmin::getSubAdminsGroups($currentUser);
|
||||
|
|
Loading…
Reference in New Issue