mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-18 15:41:26 +02:00
Switched validate_username check to groups table
git-svn-id: file:///svn/phpbb/trunk@481 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -427,11 +427,11 @@ function validate_username($username)
|
|||||||
// a UNION clause which would be very nice here :(
|
// a UNION clause which would be very nice here :(
|
||||||
// So we have to use two queries
|
// So we have to use two queries
|
||||||
case 'mysql':
|
case 'mysql':
|
||||||
$sql_users = "SELECT username
|
$sql_users = "SELECT group_name AS username
|
||||||
FROM ".USERS_TABLE."
|
FROM " . GROUPS_TABLE . "
|
||||||
WHERE LOWER(username) = '".strtolower($username)."'";
|
WHERE LOWER(group_name) = '" . strtolower($username) . "'";
|
||||||
$sql_disallow = "SELECT disallow_username
|
$sql_disallow = "SELECT disallow_username
|
||||||
FROM ".DISALLOW_TABLE."
|
FROM " . DISALLOW_TABLE . "
|
||||||
WHERE disallow_username = '$username'";
|
WHERE disallow_username = '$username'";
|
||||||
|
|
||||||
if($result = $db->sql_query($sql_users))
|
if($result = $db->sql_query($sql_users))
|
||||||
@@ -452,12 +452,12 @@ function validate_username($username)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
$sql = "SELECT disallow_username
|
$sql = "SELECT disallow_username
|
||||||
FROM ".DISALLOW_TABLE."
|
FROM " . DISALLOW_TABLE . "
|
||||||
WHERE disallow_username = '$username'
|
WHERE disallow_username = '$username'
|
||||||
UNION
|
UNION
|
||||||
SELECT username
|
SELECT group_name AS username
|
||||||
FROM ".USERS_TABLE."
|
FROM " . GROUPS_TABLE . "
|
||||||
WHERE LOWER(username) = '".strtolower($username)."'";
|
WHERE LOWER(group_name) = '" . strtolower($username) . "'";
|
||||||
|
|
||||||
if($result = $db->sql_query($sql))
|
if($result = $db->sql_query($sql))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user