Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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 <[email protected]>
  • Loading branch information
viniciuscb authored and Backportbot committed Mar 21, 2019
commit 79b7f12a79013a48ac03d18e9f195f2a5e5309f4
3 changes: 2 additions & 1 deletion apps/user_ldap/lib/User_LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ public function getNewLDAPConnection($uid) {
* 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) {
Expand All @@ -624,7 +625,7 @@ public function createUser($username, $password) {
//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;
Expand Down