diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-05-02 15:50:11 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2003-05-02 15:50:11 +0000 |
| commit | c6888eb18e5862154297a870f348d60a7e608de7 (patch) | |
| tree | af1970637400f4ba66085e7d22836301cda3b9e2 /phpBB/includes/functions_user.php | |
| parent | 9def7a65e39cdd65b0d32e28888801c584917549 (diff) | |
| download | forums-c6888eb18e5862154297a870f348d60a7e608de7.tar forums-c6888eb18e5862154297a870f348d60a7e608de7.tar.gz forums-c6888eb18e5862154297a870f348d60a7e608de7.tar.bz2 forums-c6888eb18e5862154297a870f348d60a7e608de7.tar.xz forums-c6888eb18e5862154297a870f348d60a7e608de7.zip | |
Various updates, forum links, "improve" forum management, cleanups, blah blah, note the schema changes, note also that forum management may misbehave ... reports on wrong doings are welcome ... seem to be having problems with some mcp functions under apache/win32
git-svn-id: file:///svn/phpbb/trunk@3961 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
| -rw-r--r-- | phpBB/includes/functions_user.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 40eaaf2cfc..ec72d2c940 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -438,8 +438,12 @@ class userdata extends user { global $db, $user; + // Clean up username ... convert any entities into normal + // text, remove excess spaces, then escape it + $username = strtr(trim($username), array_flip(get_html_translation_table(HTML_ENTITIES))); + $username = preg_replace('#[\s]{2,}#', '', $username); $username = $db->sql_escape($username); - + $sql = "SELECT username FROM " . USERS_TABLE . " WHERE LOWER(username) = '" . strtolower($username) . "'"; @@ -500,7 +504,7 @@ class userdata extends user if ($email != '') { - if (preg_match('/^[a-z0-9\.\-_\+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $email)) + if (preg_match('#^[a-z0-9\.\-_\+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$#is', $email)) { $sql = "SELECT ban_email FROM " . BANLIST_TABLE; |
