diff --git a/phpBB/index.php b/phpBB/index.php index 9dffade44c..c3dbbd346e 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -84,10 +84,11 @@ $birthday_list = ''; if ($config['load_birthdays'] && $config['allow_birthdays']) { $now = getdate(time() + $user->timezone + $user->dst - date('Z')); - $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday, b.ban_id + $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday FROM ' . USERS_TABLE . ' u LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid) - WHERE b.ban_id IS NULL + WHERE (b.ban_id IS NULL + OR b.ban_exclude = 1) AND u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%' AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')'; $result = $db->sql_query($sql);