Skip version and trash expiry for users that never logged in

This commit is contained in:
Jörn Friedrich Dreyer 2016-08-09 12:28:53 +02:00 committed by Bjoern Schiessle
parent d6bee61131
commit d59cb04427
No known key found for this signature in database
GPG key ID: 2378A753E2BF04F6
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);