diff options
author | Joas Schilling <coding@schilljs.com> | 2016-10-28 11:42:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-28 11:42:32 +0200 |
commit | f2cae3cee127220a5fde2726af8074837ee81ed1 (patch) | |
tree | ea3d9e1def278a2d6d2c9164701840d87f573eff /apps | |
parent | ad597d498d9298643338df2df0170159b736c12c (diff) | |
parent | f722640a32a6c0a7fb0232abf8f57052d43d19c9 (diff) | |
download | nextcloud-server-f2cae3cee127220a5fde2726af8074837ee81ed1.tar.gz nextcloud-server-f2cae3cee127220a5fde2726af8074837ee81ed1.zip |
Merge pull request #1888 from nextcloud/downstream-26361
introduce callForSeenUsers and countSeenUsers
Diffstat (limited to 'apps')
4 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php index 7d481afeb59..d366a401e2f 100644 --- a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php +++ b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php @@ -77,9 +77,9 @@ class ExpireTrash extends \OC\BackgroundJob\TimedJob { return; } - $this->userManager->callForAllUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function(IUser $user) { $uid = $user->getUID(); - if ($user->getLastLogin() === 0 || !$this->setupFS($uid)) { + if (!$this->setupFS($uid)) { return; } $dirContent = Helper::getTrashFiles('/', $uid, 'mtime'); diff --git a/apps/files_trashbin/lib/Command/ExpireTrash.php b/apps/files_trashbin/lib/Command/ExpireTrash.php index ff827718885..b016fdd6aeb 100644 --- a/apps/files_trashbin/lib/Command/ExpireTrash.php +++ b/apps/files_trashbin/lib/Command/ExpireTrash.php @@ -89,7 +89,7 @@ class ExpireTrash extends Command { } else { $p = new ProgressBar($output); $p->start(); - $this->userManager->callForAllUsers(function(IUser $user) use ($p) { + $this->userManager->callForSeenUsers(function(IUser $user) use ($p) { $p->advance(); $this->expireTrashForUser($user); }); @@ -100,7 +100,7 @@ class ExpireTrash extends Command { function expireTrashForUser(IUser $user) { $uid = $user->getUID(); - if ($user->getLastLogin() === 0 || !$this->setupFS($uid)) { + if (!$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 8e1f02cdfbf..89b8a966137 100644 --- a/apps/files_versions/lib/BackgroundJob/ExpireVersions.php +++ b/apps/files_versions/lib/BackgroundJob/ExpireVersions.php @@ -67,9 +67,9 @@ class ExpireVersions extends \OC\BackgroundJob\TimedJob { return; } - $this->userManager->callForAllUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function(IUser $user) { $uid = $user->getUID(); - if ($user->getLastLogin() === 0 || !$this->setupFS($uid)) { + if (!$this->setupFS($uid)) { return; } Storage::expireOlderThanMaxForUser($uid); diff --git a/apps/files_versions/lib/Command/ExpireVersions.php b/apps/files_versions/lib/Command/ExpireVersions.php index f384420f22f..e88ea1f7a02 100644 --- a/apps/files_versions/lib/Command/ExpireVersions.php +++ b/apps/files_versions/lib/Command/ExpireVersions.php @@ -88,7 +88,7 @@ class ExpireVersions extends Command { } else { $p = new ProgressBar($output); $p->start(); - $this->userManager->callForAllUsers(function(IUser $user) use ($p) { + $this->userManager->callForSeenUsers(function(IUser $user) use ($p) { $p->advance(); $this->expireVersionsForUser($user); }); @@ -99,7 +99,7 @@ class ExpireVersions extends Command { function expireVersionsForUser(IUser $user) { $uid = $user->getUID(); - if ($user->getLastLogin() === 0 || !$this->setupFS($uid)) { + if (!$this->setupFS($uid)) { return; } Storage::expireOlderThanMaxForUser($uid); |