Merge pull request #5609 from owncloud/fix_delete_user2

use getHome() to delete users data
This commit is contained in:
Thomas Müller 2013-10-29 13:46:42 -07:00
commit 2e731e845b
1 changed files with 3 additions and 3 deletions

View File

@ -195,12 +195,12 @@ class OC_User {
// We have to delete the user from all groups
foreach (OC_Group::getUserGroups($uid) as $i) {
OC_Group::removeFromGroup($uid, $i);
}
}
// Delete the user's keys in preferences
OC_Preferences::deleteUser($uid);
OC_Preferences::deleteUser($uid);
// Delete user files in /data/
OC_Helper::rmdirr(OC_Config::getValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $uid . '/');
OC_Helper::rmdirr(\OC_User::getHome($uid));
// Remove it from the Cache
self::getManager()->delete($uid);