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:
Lukas Reschke 2014-12-04 12:03:14 +01:00
parent 5aad902507
commit d712c27fe1
1 changed files with 1 additions and 1 deletions

View File

@ -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);