From: Jens Hausdorf Date: Tue, 19 Dec 2017 20:04:59 +0000 (+0100) Subject: use UserProfileRuntimeCache in UserBirthdayAction X-Git-Tag: 3.1.0_Beta_5~20^2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=06c3b0c210805bc9c280a0201cf429842a744175;p=GitHub%2FWoltLab%2FWCF.git use UserProfileRuntimeCache in UserBirthdayAction --- 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) {