summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2016-08-10 17:39:03 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-08-10 17:39:03 +0200
commit4d47963a6e9b6b2f7fa9df9fb1b357864ed05d6d (patch)
treecc4d6b2314addefae348f413ef1fcb73f94d4c2a /apps
parentee7106ca712ef929c8f3f6b575b601368fb853fc (diff)
downloadnextcloud-server-4d47963a6e9b6b2f7fa9df9fb1b357864ed05d6d.tar.gz
nextcloud-server-4d47963a6e9b6b2f7fa9df9fb1b357864ed05d6d.zip
Skip version and trash expiry for users that never logged in (#25745)
Diffstat (limited to 'apps')
-rw-r--r--apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php2
-rw-r--r--apps/files_versions/lib/BackgroundJob/ExpireVersions.php2
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 b682f426088..69491fb6933 100644
--- a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php
+++ b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php
@@ -78,7 +78,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 f357b73409b..1faf5c9aa56 100644
--- a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php
+++ b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php
@@ -68,7 +68,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);