]> source.dussan.org Git - nextcloud-server.git/commitdiff
we should check if a user is logged in before we check for admin privilege
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 28 Oct 2013 10:32:43 +0000 (11:32 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 28 Oct 2013 10:32:43 +0000 (11:32 +0100)
lib/util.php

index 9ba1bdb0282ff92a85f4bdd4c4e8d179bf5f3238..da2cba1b938d430d398a86a04c1e4e63ab47ada1 100755 (executable)
@@ -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();