From 1330d26720d11487ff28d1611d1050b0a29382bc Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Fri, 24 Aug 2001 15:47:14 +0000 Subject: Thought it best to add the email validate now git-svn-id: file:///svn/phpbb/trunk@931 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/profile.php | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) (limited to 'phpBB/profile.php') 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 .= "
"; - } - $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 .= "
"; + } + $error_msg .= $lang['Sorry_banned_or_taken_email']; + } + } + if($board_config['allow_namechange'] || $mode == "register") { if($username != $userdata['username'] || $mode == "register") -- cgit v1.2.1