Birthday box failed to validate if a user still exists
authorAlexander Ebert <ebert@woltlab.com>
Fri, 9 Jun 2017 12:03:33 +0000 (14:03 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 9 Jun 2017 12:03:33 +0000 (14:03 +0200)
wcfsetup/install/files/lib/system/box/TodaysBirthdaysBoxController.class.php

index 2d168ec7543725f525024e4c05b4d88a28c3b1ea..bafa59cf57999f37b17602bc150b732df17df3d2 100644 (file)
@@ -51,6 +51,10 @@ class TodaysBirthdaysBoxController extends AbstractBoxController {
                                
                                $i = 0;
                                foreach ($userProfiles as $userProfile) {
+                                       // ignore deleted users
+                                       if ($userProfile === null) continue;
+                                       
+                                       // show a maximum of 10 users
                                        if ($i == 10) break;
                                        
                                        $birthdayUserOption->setUser($userProfile->getDecoratedObject());