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
Next Next commit
Make sure mapping cache is cleared when deleting a user
This avoids phantom remnants staying after user deletion

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc authored and backportbot[bot] committed Nov 23, 2021
commit 5b2764a2aa6f5641dde5ce2843fec4d71a9ad332
5 changes: 5 additions & 0 deletions apps/user_ldap/lib/Mapping/AbstractMapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ public function unmap($name) {
DELETE FROM `' . $this->getTableName() . '`
WHERE `owncloud_name` = ?');

$dn = array_search($name, $this->cache);
if ($dn !== false) {
unset($this->cache[$dn]);
}

return $this->modify($statement, [$name]);
}

Expand Down