mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-31 18:46:02 +00:00
Hopefully nail that last LDAP niggle.
This commit is contained in:
parent
78e756e8a4
commit
963f23110d
@ -319,7 +319,7 @@ class Principal {
|
||||
* @return string The username
|
||||
*/
|
||||
function setUsername($new_username) {
|
||||
if ( $this->exists ) return false;
|
||||
if ( $this->exists && isset($this->username) ) return false;
|
||||
$this->username = $new_username;
|
||||
return $this->username;
|
||||
}
|
||||
|
||||
@ -346,9 +346,9 @@ function LDAP_check($username, $password ){
|
||||
}
|
||||
else {
|
||||
dbg_error_log( "LDAP", "user %s doesn't exist in local DB, we need to create it",$username );
|
||||
$principal->setUsername($username );
|
||||
}
|
||||
|
||||
$principal->setUsername($username);
|
||||
|
||||
// The local cached user doesn't exist, or is older, so we create/update their details
|
||||
sync_user_from_LDAP( $principal, $mapping, $valid );
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user