Merge pull request #809 from nextcloud/skip_expiry_for_users_that_never_logged_in-stable10

Skip version and trash expiry for users that never logged in
This commit is contained in:
Lukas Reschke 2016-08-10 16:31:19 +02:00 committed by GitHub
commit f3a3953ca3
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ class ExpireTrash extends \OC\BackgroundJob\TimedJob {
$this->userManager->callForAllUsers(function(IUser $user) {
$uid = $user->getUID();
if (!$this->setupFS($uid)) {
if ($user->getLastLogin() === 0 || !$this->setupFS($uid)) {
return;
}
$dirContent = Helper::getTrashFiles('/', $uid, 'mtime');

View File

@ -69,7 +69,7 @@ class ExpireVersions extends \OC\BackgroundJob\TimedJob {
$this->userManager->callForAllUsers(function(IUser $user) {
$uid = $user->getUID();
if (!$this->setupFS($uid)) {
if ($user->getLastLogin() === 0 || !$this->setupFS($uid)) {
return;
}
Storage::expireOlderThanMaxForUser($uid);