diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-06-04 21:31:35 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-06-04 21:40:32 +0200 |
commit | dfc90021cacb5b9da3bf06e705133f18b13df583 (patch) | |
tree | 00800515b6f14d5e2d8c057ecbb5b49f2a7dffb7 /lib/user.php | |
parent | b0d83d6d8d123171d97ac48e2fdb16d99093ca57 (diff) | |
download | nextcloud-server-dfc90021cacb5b9da3bf06e705133f18b13df583.tar.gz nextcloud-server-dfc90021cacb5b9da3bf06e705133f18b13df583.zip |
load authentication apps before checking wether user exists. fixes oc-910
Diffstat (limited to 'lib/user.php')
-rw-r--r-- | lib/user.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/user.php b/lib/user.php index 17c11322b80..9bfbfd8ee70 100644 --- a/lib/user.php +++ b/lib/user.php @@ -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; } /** |