]> source.dussan.org Git - nextcloud-server.git/commitdiff
load authentication apps before checking wether user exists. fixes oc-910
authorArthur Schiwon <blizzz@owncloud.com>
Mon, 4 Jun 2012 19:31:35 +0000 (21:31 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Mon, 4 Jun 2012 19:40:32 +0000 (21:40 +0200)
lib/user.php

index 17c11322b807496a6c4e26f187efac80bed06b69..9bfbfd8ee7038ce35fcf525eebabd287f4207e05 100644 (file)
@@ -129,7 +129,7 @@ class OC_User {
                if(trim($password) == ''){
                        throw new Exception('A valid password must be provided');
                }
-               
+
                // Check if user already exists
                if( self::userExists($uid) ){
                        throw new Exception('The username is already being used');
@@ -242,12 +242,13 @@ class OC_User {
         * Checks if the user is logged in
         */
        public static function isLoggedIn(){
-               if( isset($_SESSION['user_id']) AND $_SESSION['user_id'] AND self::userExists($_SESSION['user_id']) ){
-                       return true;
-               }
-               else{
-                       return false;
+               if( isset($_SESSION['user_id']) AND $_SESSION['user_id']{
+                       OC_App::loadApps(array('authentication'));
+                       if (self::userExists($_SESSION['user_id']) ){
+                               return true;
+                       }
                }
+               return false;
        }
 
        /**