mirror of
https://github.com/nextcloud/server.git
synced 2026-02-19 02:38:40 -05:00
load authentication apps before checking wether user exists. fixes oc-910
This commit is contained in:
parent
b0d83d6d8d
commit
dfc90021ca
1 changed files with 7 additions and 6 deletions
13
lib/user.php
13
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue