summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-30 22:59:31 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-30 22:59:31 +0100
commit3f42c890be86fdeebbf9008ccac117cb4f292e02 (patch)
treefbe998e7921fe868f42ed1083129187f19bd4781 /lib/private
parent77e4305841337132ddb4a6f03d751295a0454f3a (diff)
downloadnextcloud-server-3f42c890be86fdeebbf9008ccac117cb4f292e02.tar.gz
nextcloud-server-3f42c890be86fdeebbf9008ccac117cb4f292e02.zip
we should check if a user is logged in before we check for admin privilege
Diffstat (limited to 'lib/private')
-rwxr-xr-xlib/private/util.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index f63884c0f32..176eb4bc369 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -579,6 +579,7 @@ class OC_Util {
* @return void
*/
public static function checkAdminUser() {
+ OC_Util::checkLoggedIn();
if( !OC_User::isAdminUser(OC_User::getUser())) {
header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' ));
exit();
@@ -611,6 +612,7 @@ class OC_Util {
* @return array $groups where the current user is subadmin
*/
public static function checkSubAdminUser() {
+ OC_Util::checkLoggedIn();
if(!OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' ));
exit();