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>
This commit is contained in:
Côme Chilliet 2021-11-22 14:49:34 +01:00 committed by backportbot[bot]
parent 5478d72bc7
commit 5b2764a2aa

View file

@ -379,6 +379,11 @@ abstract class AbstractMapping {
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]);
}