From 10fa55f5a0c624986117185dca32b7c195258f13 Mon Sep 17 00:00:00 2001 From: James Atkinson Date: Sun, 3 Jun 2001 23:10:07 +0000 Subject: Fixed reply w/ quote link (functionality still dosan't exist for it though) Fixed bug with being able to modifiy someone elses profile Fixed bug with BBCode not working Fixed bug with validate_username causing editing of profile to fail (only checks if you actually change you name now) git-svn-id: file:///svn/phpbb/trunk@421 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/profile.php | 138 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 72 insertions(+), 66 deletions(-) (limited to 'phpBB/profile.php') diff --git a/phpBB/profile.php b/phpBB/profile.php index e799ca6c88..beaa7f743a 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -13,7 +13,7 @@ /*************************************************************************** - * + * * This program is free software; you can redistribute it and/or modified * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -48,11 +48,11 @@ 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." + $sql_users = "SELECT username + FROM ".USERS_TABLE." WHERE LOWER(username) = '".strtolower($username)."'"; - $sql_disallow = "SELECT disallow_username - FROM ".DISALLOW_TABLE." + $sql_disallow = "SELECT disallow_username + FROM ".DISALLOW_TABLE." WHERE disallow_username = '$username'"; if($result = $db->sql_query($sql_users)) @@ -72,12 +72,12 @@ function validate_username($username) break; default: - $sql = "SELECT disallow_username - FROM ".DISALLOW_TABLE." - WHERE disallow_username = '$username' - UNION - SELECT username - FROM ".USERS_TABLE." + $sql = "SELECT disallow_username + FROM ".DISALLOW_TABLE." + WHERE disallow_username = '$username' + UNION + SELECT username + FROM ".USERS_TABLE." WHERE LOWER(username) = '".strtolower($username)."'"; if($result = $db->sql_query($sql)) @@ -97,9 +97,9 @@ function language_select($default, $dirname="language/") global $phpEx; $dir = opendir($dirname); $lang_select = "