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>
pull/29851/head
Côme Chilliet 2021-11-22 14:49:34 +07:00 committed by backportbot[bot]
parent fb701e344e
commit 23f42f3b50
1 changed files with 5 additions and 0 deletions

@ -380,6 +380,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]);
}