diff options
author | Andreas Fischer <bantu@phpbb.com> | 2010-07-11 01:54:03 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2010-07-11 01:54:03 +0200 |
commit | eeb65d2958fcccc1fd2ccfbf9e154b4e30052977 (patch) | |
tree | 3b4ca10805dca7b18e64634709f317256611ff49 /phpBB/includes/functions_user.php | |
parent | a2918fd98e61db0e7e9885fb546abc024c84d0fc (diff) | |
parent | 2d9aa45aefc4d4e4c76edd7763efc2cd97b0801f (diff) | |
download | forums-eeb65d2958fcccc1fd2ccfbf9e154b4e30052977.tar forums-eeb65d2958fcccc1fd2ccfbf9e154b4e30052977.tar.gz forums-eeb65d2958fcccc1fd2ccfbf9e154b4e30052977.tar.bz2 forums-eeb65d2958fcccc1fd2ccfbf9e154b4e30052977.tar.xz forums-eeb65d2958fcccc1fd2ccfbf9e154b4e30052977.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/9637] Do not cache SQL server version in all cases
[ticket/9629] Allow style.php to retrieve its session ID from cookies
[ticket/9678] Flash attachments are not displayed in subsilver2.
[ticket/9677] Subsilver2 is missing the bbcode-helpline for inline-attachments.
[ticket/9650] Do not allow banning the anonymous user by username
Conflicts:
phpBB/styles/subsilver2/template/attachment.html
phpBB/styles/subsilver2/template/posting_buttons.html
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index bb99314ced..6f6d7526b7 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -837,14 +837,15 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('username_clean', $sql_usernames); - // Do not allow banning yourself + // Do not allow banning yourself, the guest account, or founders. + $non_bannable = array($user->data['user_id'], ANONYMOUS); if (sizeof($founder)) { - $sql .= ' AND ' . $db->sql_in_set('user_id', array_merge(array_keys($founder), array($user->data['user_id'])), true); + $sql .= ' AND ' . $db->sql_in_set('user_id', array_merge(array_keys($founder), $non_bannable), true); } else { - $sql .= ' AND user_id <> ' . $user->data['user_id']; + $sql .= ' AND ' . $db->sql_in_set('user_id', $non_bannable, true); } $result = $db->sql_query($sql); |