diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-05-30 18:33:14 -0400 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-05-30 18:34:53 -0400 |
commit | 96d0d4533c37f23e3e5403a336aaed5a42ce90d5 (patch) | |
tree | 50ece43827464a4cc5d95ba16c69e702d4e62fb0 /register.php | |
parent | acf5cd0a4b55c1b6817a9956a57103b40483d82f (diff) | |
download | ampache-96d0d4533c37f23e3e5403a336aaed5a42ce90d5.tar.gz ampache-96d0d4533c37f23e3e5403a336aaed5a42ce90d5.tar.bz2 ampache-96d0d4533c37f23e3e5403a336aaed5a42ce90d5.zip |
Drop validateEmail
PHPMailer will validate the format of the address, and that's all we
really want.
Diffstat (limited to 'register.php')
-rw-r--r-- | register.php | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/register.php b/register.php index 68f0c065..e5c2d01e 100644 --- a/register.php +++ b/register.php @@ -30,13 +30,6 @@ if (!Config::get('allow_public_registration') || Config::get('demo_mode')) { exit(); } -/** - * These are only needed for this page so they aren't included in init.php - * this is for email validation and the cool little graphic -*/ -require_once Config::get('prefix') . '/modules/validatemail/validateEmailFormat.php'; -require_once Config::get('prefix') . '/modules/validatemail/validateEmail.php'; - /* Don't even include it if we aren't going to use it */ if (Config::get('captcha_public_reg')) { define ("CAPTCHA_INVERSE", 1); @@ -97,29 +90,11 @@ switch ($_REQUEST['action']) { Error::add('fullname', T_("Please fill in your full name (Firstname Lastname)")); } - /* Check the mail for correct address formation. */ - $attempt = 0; - $max_attempts = 3; - $response_code = ""; - - while ( $response_code == "" || strstr( $response_code, "fsockopen error" )) { - $validate_results = validateEmail( $email ); - $response_code = $validate_results[1]; - if($attempt == $max_attempts) { - break; - } - $attempt++; + // Check the mail for correct address formation. + if (!Mailer::validate_address($email)) { + Error::add('email', T_('Invalid email address') } - if ($validate_results[0] OR strstr($validate_results[1],"greylist")) { - $mmsg = "MAILOK"; - } - else { - Error::add('email', T_("Error Email address not confirmed") - . "<br />$validate_results[1]"); - } - /* End of mailcheck */ - if (!$pass1) { Error::add('password', T_("You must enter a password")); } |