diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-08-10 16:31:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-10 16:31:11 +0200 |
commit | 8831d1f53bf8388c14c443dd41958cf4f61889d4 (patch) | |
tree | 5667dc85bd134f8124b9410f7b0e20c60f5e8cec | |
parent | 7249f1340f2ac92aa2a4d762e5af7dbc910257c0 (diff) | |
parent | d59cb04427128bd04311a24595599acb0da5589f (diff) | |
download | nextcloud-server-8831d1f53bf8388c14c443dd41958cf4f61889d4.tar.gz nextcloud-server-8831d1f53bf8388c14c443dd41958cf4f61889d4.zip |
Merge pull request #808 from nextcloud/skip_expiry_for_users_that_never_logged_in
Skip version and trash expiry for users that never logged in
-rw-r--r-- | apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php | 2 | ||||
-rw-r--r-- | 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); |