diff options
author | the_systech <the_systech@users.sourceforge.net> | 2002-01-03 15:12:10 +0000 |
---|---|---|
committer | the_systech <the_systech@users.sourceforge.net> | 2002-01-03 15:12:10 +0000 |
commit | 1c40ad57367f2f721e01afa97b8303ac3b5bada1 (patch) | |
tree | 0f5050ed7102258d2e126c30a06f40ed284ecedc /phpBB/includes | |
parent | a4934d0e25187257340a4946b6f545b3c54e254f (diff) | |
download | forums-1c40ad57367f2f721e01afa97b8303ac3b5bada1.tar forums-1c40ad57367f2f721e01afa97b8303ac3b5bada1.tar.gz forums-1c40ad57367f2f721e01afa97b8303ac3b5bada1.tar.bz2 forums-1c40ad57367f2f721e01afa97b8303ac3b5bada1.tar.xz forums-1c40ad57367f2f721e01afa97b8303ac3b5bada1.zip |
Ok that was stupid.. Better version of a fix for 497077... Somebody hand me a beer.
git-svn-id: file:///svn/phpbb/trunk@1784 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index cd6bf26fca..fe74466391 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -502,6 +502,7 @@ function validate_username($username) switch(SQL_LAYER) { case 'mysql': + case 'mysql4': $sql_users = "SELECT u.username, g.group_name FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ug.user_id = u.user_id @@ -526,31 +527,6 @@ function validate_username($username) } } break; - case 'mysql4': - $sql_users = "SELECT u.username, g.group_name - FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug - WHERE ug.user_id = u.user_id - AND g.group_id = ug.group_id - AND ( LOWER(u.username) = '" . strtolower(str_replace("\'", "''", $username)) . "' - OR LOWER(g.group_name) = '" . strtolower(str_replace("\'", "''", $username)) . "' )"; - $sql_disallow = "SELECT disallow_username - FROM " . DISALLOW_TABLE . " - WHERE '" . str_replace("\'", "''", $username) . "' LIKE disallow_username"; - if($result = $db->sql_query($sql_users)) - { - if($db->sql_numrows($result) > 0) - { - return(FALSE); - } - } - if($result = $db->sql_query($sql_disallow)) - { - if($db->sql_numrows($result) > 0) - { - return(FALSE); - } - } - break; default: $sql = "SELECT u.username, g.group_name |