diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-24 15:47:14 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-08-24 15:47:14 +0000 |
| commit | 1330d26720d11487ff28d1611d1050b0a29382bc (patch) | |
| tree | 0e11075d0c6d9ac152e97b7b78424157b2bd1da3 /phpBB/profile.php | |
| parent | 8723edc8c8cbe0b69a06275b9deb0b8be5430fad (diff) | |
| download | forums-1330d26720d11487ff28d1611d1050b0a29382bc.tar forums-1330d26720d11487ff28d1611d1050b0a29382bc.tar.gz forums-1330d26720d11487ff28d1611d1050b0a29382bc.tar.bz2 forums-1330d26720d11487ff28d1611d1050b0a29382bc.tar.xz forums-1330d26720d11487ff28d1611d1050b0a29382bc.zip | |
Thought it best to add the email validate now
git-svn-id: file:///svn/phpbb/trunk@931 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/profile.php')
| -rw-r--r-- | phpBB/profile.php | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/phpBB/profile.php b/phpBB/profile.php index fc4bbf195a..2a8b205913 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -322,27 +322,6 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) // // Do a ban check on this email address // - $sql = "SELECT ban_email - FROM " . BANLIST_TABLE; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Couldn't obtain email ban information.", "", __LINE__, __FILE__, $sql); - } - $ban_email_list = $db->sql_fetchrowset($result); - for($i = 0; $i < count($ban_email_list); $i++) - { - $match_email = str_replace("*@", ".*@", $ban_email_list[$i]['ban_email']); - if( preg_match("/^" . $match_email . "$/is", $email) ) - { - $error = TRUE; - if(isset($error_msg)) - { - $error_msg .= "<br />"; - } - $error_msg .= $lang['Sorry_banned_email']; - } - } - if(!empty($password) && !empty($password_confirm)) { // Awww, the user wants to change their password, isn't that cute.. @@ -363,6 +342,19 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $error_msg = $lang['Password_mismatch']; } + if($email != $userdata['user_email'] || $mode == "register") + { + if(!validate_email($email)) + { + $error = TRUE; + if(isset($error_msg)) + { + $error_msg .= "<br />"; + } + $error_msg .= $lang['Sorry_banned_or_taken_email']; + } + } + if($board_config['allow_namechange'] || $mode == "register") { if($username != $userdata['username'] || $mode == "register") |
