Merge pull request #809 from nextcloud/skip_expiry_for_users_that_never_logged_in-stable10
Skip version and trash expiry for users that never logged in
This commit is contained in:
commit
f3a3953ca3
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue