summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2016-08-10 17:39:22 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-08-10 17:39:22 +0200
commit2f08c6c14a702063b2b6f6248e2e6d931544b6a1 (patch)
tree7763d76900fe8213984e50bca6f1c4c5710ff9bb
parent582a4bb33d415a28426ef17be26fbbc848f5ebb7 (diff)
downloadnextcloud-server-2f08c6c14a702063b2b6f6248e2e6d931544b6a1.tar.gz
nextcloud-server-2f08c6c14a702063b2b6f6248e2e6d931544b6a1.zip
Skip version and tras expiry for users that never logged in (#25742)
-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 8a4e2d41fec..98643354094 100644
--- a/apps/files_trashbin/lib/backgroundjob/expiretrash.php
+++ b/apps/files_trashbin/lib/backgroundjob/expiretrash.php
@@ -77,7 +77,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 8e14e65b9a7..d60c86c5bd3 100644
--- a/apps/files_versions/lib/backgroundjob/expireversions.php
+++ b/apps/files_versions/lib/backgroundjob/expireversions.php
@@ -67,7 +67,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);