From d59cb04427128bd04311a24595599acb0da5589f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 9 Aug 2016 12:28:53 +0200 Subject: [PATCH] Skip version and trash expiry for users that never logged in --- apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php | 2 +- apps/files_versions/lib/BackgroundJob/ExpireVersions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php index f2c16843b70..7d481afeb59 100644 --- a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php +++ b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php @@ -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'); diff --git a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php index a5d3efda77b..8e1f02cdfbf 100644 --- a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php +++ b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php @@ -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); -- 2.39.5