Also remove the user's home storage from the storage table when deleting a user
This commit is contained in:
parent
9851727b0d
commit
374e3475c9
|
@ -70,4 +70,17 @@ class Storage {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* remove the entry for the storage
|
||||||
|
*
|
||||||
|
* @param string $storageId
|
||||||
|
*/
|
||||||
|
public static function remove($storageId) {
|
||||||
|
if (strlen($storageId) > 64) {
|
||||||
|
$storageId = md5($storageId);
|
||||||
|
}
|
||||||
|
$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';
|
||||||
|
\OC_DB::executeAudited($sql, array($storageId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,6 +205,9 @@ class OC_User {
|
||||||
// Delete user files in /data/
|
// Delete user files in /data/
|
||||||
OC_Helper::rmdirr(\OC_User::getHome($uid));
|
OC_Helper::rmdirr(\OC_User::getHome($uid));
|
||||||
|
|
||||||
|
// Delete the users entry in the storage table
|
||||||
|
\OC\Files\Cache\Storage::remove('home::' . $uid);
|
||||||
|
|
||||||
// Remove it from the Cache
|
// Remove it from the Cache
|
||||||
self::getManager()->delete($uid);
|
self::getManager()->delete($uid);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue