|
|
@@ -615,11 +615,19 @@ 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 |
|
|
|
* @return bool was the user created? |
|
|
|
* @return bool |
|
|
|
*/ |
|
|
|
public function createUser($username, $password) { |
|
|
|
if ($this->userPluginManager->implementsActions(Backend::CREATE_USER)) { |
|
|
|
return $this->userPluginManager->createUser($username, $password); |
|
|
|
if ($dn = $this->userPluginManager->createUser($username, $password)) { |
|
|
|
if (is_string($dn)) { |
|
|
|
//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."); |
|
|
|
} |
|
|
|
} |
|
|
|
return (bool) $dn; |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |