Use callForSeenUsers for avatar migration
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
f8352fcb8d
commit
e7ec4601a3
|
@ -64,8 +64,7 @@ class MoveAvatarsBackgroundJob extends QueuedJob {
|
|||
|
||||
private function moveAvatars() {
|
||||
$counter = 0;
|
||||
$this->userManager->callForAllUsers(function (IUser $user) use ($counter) {
|
||||
if ($user->getLastLogin() !== 0) {
|
||||
$this->userManager->callForSeenUsers(function (IUser $user) use ($counter) {
|
||||
$uid = $user->getUID();
|
||||
|
||||
\OC\Files\Filesystem::initMountPoints($uid);
|
||||
|
@ -94,7 +93,6 @@ class MoveAvatarsBackgroundJob extends QueuedJob {
|
|||
$avatar->delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
$counter++;
|
||||
if ($counter % 100) {
|
||||
$this->logger->info('{amount} avatars migrated', ['amount' => $counter]);
|
||||
|
|
Loading…
Reference in New Issue