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
parent 68fecc1d9f
commit 51ea7dc020
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

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]);
}