From: Marcel Werk Date: Mon, 23 Dec 2024 13:36:21 +0000 (+0100) Subject: Use `UserProfile::ACCESS_EVERYONE` constant X-Git-Tag: 6.1.3_dev_1~11^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e4c3633fe0fc366562b1cb41dc0ed1e569f89102;p=GitHub%2FWoltLab%2FWCF.git Use `UserProfile::ACCESS_EVERYONE` constant --- diff --git a/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php b/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php index 537d52e90c..3d8f9be35e 100644 --- a/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php @@ -349,7 +349,7 @@ final class UserRebuildDataWorker extends AbstractLinearRebuildDataWorker private function updateUserOnlineStatus(array $users): void { foreach ($users as $user) { - if (!$user->canViewOnlineStatus) { + if ($user->canViewOnlineStatus == UserProfile::ACCESS_EVERYONE) { continue; } $userProfile = new UserProfile($user->getDecoratedObject()); @@ -358,7 +358,7 @@ final class UserRebuildDataWorker extends AbstractLinearRebuildDataWorker } $user->updateUserOptions([ - User::getUserOptionID('canViewOnlineStatus') => 0, + User::getUserOptionID('canViewOnlineStatus') => UserProfile::ACCESS_EVERYONE, ]); } }