diff options
author | Simon Rettberg | 2018-04-16 15:10:55 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-04-16 15:10:55 +0200 |
commit | b364fcb761be1cbed909422252d32ff842af81be (patch) | |
tree | ba69fe6f2eee4508d5f9fe3e2b619f667c063c59 | |
parent | [news] Update translations (diff) | |
download | slx-admin-b364fcb761be1cbed909422252d32ff842af81be.tar.gz slx-admin-b364fcb761be1cbed909422252d32ff842af81be.tar.xz slx-admin-b364fcb761be1cbed909422252d32ff842af81be.zip |
[inc/User] Activate module locations before access
-rw-r--r-- | inc/user.inc.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/user.inc.php b/inc/user.inc.php index f12cc39f..2571c61c 100644 --- a/inc/user.inc.php +++ b/inc/user.inc.php @@ -90,8 +90,12 @@ class User return PermissionUtil::getAllowedLocations(self::$user['userid'], $permission); } if (self::$user['permissions'] & Permission::get('superadmin')) { - $a = array_keys(Location::getLocationsAssoc()); - $a[] = 0; + if (Module::isAvailable('locations')) { + $a = array_keys(Location::getLocationsAssoc()); + $a[] = 0; + } else { + $a = [0]; + } return $a; } return array(); |