LDAP plugin: force createUser to return new user's DN
LDAP plugins must change the createUser method to return the DN, as we need this to update the cache. Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
This commit is contained in:
parent
dd30daa3af
commit
d97339830d
|
@ -613,6 +613,7 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
|
|||
* create new user
|
||||
* @param string $username username of the new user
|
||||
* @param string $password password of the new user
|
||||
* @throws \UnexpectedValueException
|
||||
* @return bool
|
||||
*/
|
||||
public function createUser($username, $password) {
|
||||
|
@ -622,7 +623,7 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
|
|||
//updates user mapping
|
||||
$this->access->dn2ocname($dn, $username, true);
|
||||
} else {
|
||||
throw new \Exception("LDAP Plugin: Method createUser changed to return the user DN instead of boolean.");
|
||||
throw new \UnexpectedValueException("LDAP Plugin: Method createUser changed to return the user DN instead of boolean.");
|
||||
}
|
||||
}
|
||||
return (bool) $dn;
|
||||
|
|
Loading…
Reference in New Issue