From 06c3b0c210805bc9c280a0201cf429842a744175 Mon Sep 17 00:00:00 2001 From: Jens Hausdorf Date: Tue, 19 Dec 2017 21:04:59 +0100 Subject: [PATCH] use UserProfileRuntimeCache in UserBirthdayAction --- .../files/lib/data/user/UserBirthdayAction.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/data/user/UserBirthdayAction.class.php b/wcfsetup/install/files/lib/data/user/UserBirthdayAction.class.php index e76f3a2302..c3ee3481a7 100644 --- a/wcfsetup/install/files/lib/data/user/UserBirthdayAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserBirthdayAction.class.php @@ -3,6 +3,7 @@ namespace wcf\data\user; use wcf\data\user\option\UserOption; use wcf\data\IGroupedUserListAction; use wcf\system\cache\builder\UserOptionCacheBuilder; +use wcf\system\cache\runtime\UserProfileRuntimeCache; use wcf\system\exception\UserInputException; use wcf\system\user\UserBirthdayCache; use wcf\system\WCF; @@ -50,11 +51,9 @@ class UserBirthdayAction extends UserProfileAction implements IGroupedUserListAc $birthdayUserOption = $userOptions['birthday']; $userIDs = UserBirthdayCache::getInstance()->getBirthdays($month, $day); - $userList = new UserProfileList(); - $userList->setObjectIDs($userIDs); - $userList->readObjects(); + $userProfiles = UserProfileRuntimeCache::getInstance()->getObjects($userIDs); - foreach ($userList->getObjects() as $user) { + foreach ($userProfiles as $user) { $birthdayUserOption->setUser($user->getDecoratedObject()); if (!$user->isProtected() && $birthdayUserOption->isVisible() && $user->getAge($year) >= 0) { -- 2.20.1