Revert "Use Cache->clear to cleanup the filecache for removed users"
This reverts commit 5a5b6f187e
.
This commit is contained in:
parent
5a5b6f187e
commit
8d6a3a00b4
1 changed files with 5 additions and 10 deletions
|
@ -205,13 +205,8 @@ 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));
|
||||||
|
|
||||||
// Cleanup the filecache
|
// Delete the users entry in the storage table
|
||||||
$mount = \OC\Files\Filesystem::getMountByStorageId('home::' . $uid);
|
\OC\Files\Cache\Storage::remove('home::' . $uid);
|
||||||
if (count($mount) > 0) {
|
|
||||||
$mount = $mount[0];
|
|
||||||
$cache = $mount->getStorage()->getCache();
|
|
||||||
$cache->clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove it from the Cache
|
// Remove it from the Cache
|
||||||
self::getManager()->delete($uid);
|
self::getManager()->delete($uid);
|
||||||
|
@ -248,15 +243,15 @@ class OC_User {
|
||||||
|
|
||||||
$uid = $backend->getCurrentUserId();
|
$uid = $backend->getCurrentUserId();
|
||||||
$run = true;
|
$run = true;
|
||||||
OC_Hook::emit("OC_User", "pre_login", array("run" => &$run, "uid" => $uid));
|
OC_Hook::emit( "OC_User", "pre_login", array( "run" => &$run, "uid" => $uid ));
|
||||||
|
|
||||||
if ($uid) {
|
if($uid) {
|
||||||
session_regenerate_id(true);
|
session_regenerate_id(true);
|
||||||
self::setUserId($uid);
|
self::setUserId($uid);
|
||||||
self::setDisplayName($uid);
|
self::setDisplayName($uid);
|
||||||
self::getUserSession()->setLoginName($uid);
|
self::getUserSession()->setLoginName($uid);
|
||||||
|
|
||||||
OC_Hook::emit("OC_User", "post_login", array("uid" => $uid, 'password' => ''));
|
OC_Hook::emit( "OC_User", "post_login", array( "uid" => $uid, 'password'=>'' ));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue