diff options
author | Vinicius Cubas Brand <viniciuscb@gmail.com> | 2019-03-14 11:59:27 -0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-03-21 10:20:46 +0100 |
commit | 61572a5b2e92182c6fea17855abd9b2b4f942334 (patch) | |
tree | 3192a0018c8d9ad1c41c2760e944916d39f817f2 /apps/user_ldap | |
parent | a2c38148e7b7390884e89b8fee252a1914b6ccf9 (diff) | |
download | nextcloud-server-61572a5b2e92182c6fea17855abd9b2b4f942334.tar.gz nextcloud-server-61572a5b2e92182c6fea17855abd9b2b4f942334.zip |
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>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/User_LDAP.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index 855c13e13fb..e69eafecc86 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -615,6 +615,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) { @@ -624,7 +625,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; |