mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(user_ldap): Correctly cache that user exists to avoid a request on mapping new user
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
41aadb5be8
commit
64ae882b49
3 changed files with 1 additions and 3 deletions
|
|
@ -740,6 +740,7 @@ class Access extends LDAPUtility {
|
|||
*/
|
||||
public function cacheUserExists(string $ocName): void {
|
||||
$this->connection->writeToCache('userExists' . $ocName, true);
|
||||
$this->connection->writeToCache('userExistsOnLDAP' . $ocName, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -265,9 +265,7 @@ class Manager {
|
|||
if ($this->isDeletedUser($id)) {
|
||||
return true;
|
||||
}
|
||||
$this->logger->debug('username2dn({id})', ['id' => $id]);
|
||||
$dn = $this->access->username2dn($id);
|
||||
$this->logger->debug('end username2dn({id})', ['id' => $id]);
|
||||
if ($dn !== false) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -612,7 +612,6 @@ class User_LDAP extends BackendUtility implements IUserBackend, UserInterface, I
|
|||
$uuid,
|
||||
true
|
||||
);
|
||||
$this->access->cacheUserExists($username);
|
||||
} else {
|
||||
$this->logger->warning(
|
||||
'Failed to map created LDAP user with userid {userid}, because UUID could not be determined',
|
||||
|
|
|
|||
Loading…
Reference in a new issue