diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2009-06-17 10:01:54 +0000 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2009-06-17 10:01:54 +0000 |
| commit | 2b020c632707f1eefe96392ba4cf074af3cab6d8 (patch) | |
| tree | 517144282e4e99e41e5bcfd3ed57036386c69c78 /phpBB/index.php | |
| parent | ac72c7e0491cf78c5af852236d8e0543d85515e1 (diff) | |
| download | forums-2b020c632707f1eefe96392ba4cf074af3cab6d8.tar forums-2b020c632707f1eefe96392ba4cf074af3cab6d8.tar.gz forums-2b020c632707f1eefe96392ba4cf074af3cab6d8.tar.bz2 forums-2b020c632707f1eefe96392ba4cf074af3cab6d8.tar.xz forums-2b020c632707f1eefe96392ba4cf074af3cab6d8.zip | |
Fix bug #20625 - Do not display birthdays of banned users
Authorised by: acydburn
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9604 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/index.php')
| -rw-r--r-- | phpBB/index.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/index.php b/phpBB/index.php index 2d1329c511..9dffade44c 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -84,10 +84,12 @@ $birthday_list = ''; if ($config['load_birthdays'] && $config['allow_birthdays']) { $now = getdate(time() + $user->timezone + $user->dst - date('Z')); - $sql = 'SELECT user_id, username, user_colour, user_birthday - FROM ' . USERS_TABLE . " - WHERE user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%' - AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')'; + $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday, b.ban_id + FROM ' . USERS_TABLE . ' u + LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid) + WHERE b.ban_id IS NULL + 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); while ($row = $db->sql_fetchrow($result)) |
