mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00: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:
parent
c08decbf1a
commit
59b2756448
1 changed files with 8 additions and 8 deletions
|
@ -427,9 +427,9 @@ function validate_username($username)
|
|||
// a UNION clause which would be very nice here :(
|
||||
// So we have to use two queries
|
||||
case 'mysql':
|
||||
$sql_users = "SELECT username
|
||||
FROM ".USERS_TABLE."
|
||||
WHERE LOWER(username) = '".strtolower($username)."'";
|
||||
$sql_users = "SELECT group_name AS username
|
||||
FROM " . GROUPS_TABLE . "
|
||||
WHERE LOWER(group_name) = '" . strtolower($username) . "'";
|
||||
$sql_disallow = "SELECT disallow_username
|
||||
FROM " . DISALLOW_TABLE . "
|
||||
WHERE disallow_username = '$username'";
|
||||
|
@ -455,9 +455,9 @@ function validate_username($username)
|
|||
FROM " . DISALLOW_TABLE . "
|
||||
WHERE disallow_username = '$username'
|
||||
UNION
|
||||
SELECT username
|
||||
FROM ".USERS_TABLE."
|
||||
WHERE LOWER(username) = '".strtolower($username)."'";
|
||||
SELECT group_name AS username
|
||||
FROM " . GROUPS_TABLE . "
|
||||
WHERE LOWER(group_name) = '" . strtolower($username) . "'";
|
||||
|
||||
if($result = $db->sql_query($sql))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue