Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-31 15:59:50 +0400
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-31 15:59:50 +0400
commit1b1859c4ea569b6ac3f12658e5d3eafd8b7f2a7c (patch)
tree8ffced0f9be5739cd6910827bf32f635600869d3 /lib
parent2d643a7c8d789a9758394075f83b0626674fb269 (diff)
parent5ca03f851ee83156d5ef3623a7579707dc52518b (diff)
Merge pull request #5574 from owncloud/fixing-5271-stable5
we should check if a user is logged in before we check for admin privile...
Diffstat (limited to 'lib')
-rwxr-xr-xlib/util.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index 9ba1bdb0282..12c399695dc 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -404,6 +404,7 @@ class OC_Util {
* Check if the user is a admin, redirects to home if not
*/
public static function checkAdminUser() {
+ \OC_Util::checkLoggedIn();
if( !OC_User::isAdminUser(OC_User::getUser())) {
header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' ));
exit();
@@ -436,6 +437,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();