]> source.dussan.org Git - nextcloud-server.git/commitdiff
Skip version and trash expiry for users that never logged in 808/head
authorJörn Friedrich Dreyer <jfd@butonic.de>
Tue, 9 Aug 2016 10:28:53 +0000 (12:28 +0200)
committerBjoern Schiessle <bjoern@schiessle.org>
Wed, 10 Aug 2016 08:51:51 +0000 (10:51 +0200)
apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php
apps/files_versions/lib/BackgroundJob/ExpireVersions.php

index f2c16843b7004b93cce42d6158a736b55331737d..7d481afeb59d75a1337b78b0929a2adf4617b57d 100644 (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');
index a5d3efda77b269b1076c41ca29c20b80aaabb69f..8e1f02cdfbf0c0a6ec3e42438949cb35b0163d70 100644 (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);