Skip to content
Snippets Groups Projects
Commit 454f81fb authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

load authentication apps before checking wether user exists. fixes oc-910

parent 773f3cf9
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,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');
......@@ -240,12 +240,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;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment