aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/index.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-03-02 01:05:40 +0100
committerNils Adermann <naderman@naderman.de>2010-03-02 01:05:40 +0100
commit021c186be91095397d4e76801738373989360a52 (patch)
tree4a5b42c0ebcaeb0be77edacb839bf164fe2dadc0 /phpBB/index.php
parent4f9c3b8f5c0181c2ebf367436f3c0336d8f2251d (diff)
parent3ddedd5ff228cdcc3c0b05000affe3944afc7854 (diff)
downloadforums-021c186be91095397d4e76801738373989360a52.tar
forums-021c186be91095397d4e76801738373989360a52.tar.gz
forums-021c186be91095397d4e76801738373989360a52.tar.bz2
forums-021c186be91095397d4e76801738373989360a52.tar.xz
forums-021c186be91095397d4e76801738373989360a52.zip
Merge commit 'release-3.0.6-RC1'
Diffstat (limited to 'phpBB/index.php')
-rw-r--r--phpBB/index.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/index.php b/phpBB/index.php
index 2d1329c511..c3dbbd346e 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -84,10 +84,13 @@ $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
+ FROM ' . USERS_TABLE . ' u
+ LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid)
+ 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);
while ($row = $db->sql_fetchrow($result))