From: Thomas Müller Date: Wed, 30 Oct 2013 21:59:31 +0000 (+0100) Subject: we should check if a user is logged in before we check for admin privilege X-Git-Tag: v6.0.0beta3~36^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3f42c890be86fdeebbf9008ccac117cb4f292e02;p=nextcloud-server.git we should check if a user is logged in before we check for admin privilege --- 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();