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 0475315dd4
commit 73de15fb08
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);