~ubuntu-branches/ubuntu/wily/ampache/wily

« back to all changes in this revision

Viewing changes to register.php

  • Committer: Package Import Robot
  • Author(s): Charlie Smotherman
  • Date: 2013-07-19 20:49:51 UTC
  • mfrom: (1.3.7)
  • Revision ID: package-import@ubuntu.com-20130719204951-0t0bfke038j9ojht
Tags: 3.6-rzb2752+dfsg-0ubuntu1
* New upstream snapshot.
* Switched packaging to use xz compression.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    exit();
31
31
}
32
32
 
33
 
/**
34
 
 * These are only needed for this page so they aren't included in init.php
35
 
 * this is for email validation and the cool little graphic
36
 
*/
37
 
require_once Config::get('prefix') . '/modules/validatemail/validateEmailFormat.php';
38
 
require_once Config::get('prefix') . '/modules/validatemail/validateEmail.php';
39
 
 
40
33
/* Don't even include it if we aren't going to use it */
41
34
if (Config::get('captcha_public_reg')) {
42
35
    define ("CAPTCHA_INVERSE", 1);
97
90
            Error::add('fullname', T_("Please fill in your full name (Firstname Lastname)"));
98
91
        }
99
92
 
100
 
        /* Check the mail for correct address formation. */
101
 
        $attempt = 0;
102
 
        $max_attempts = 3;
103
 
        $response_code = "";
104
 
 
105
 
        while ( $response_code == "" || strstr( $response_code, "fsockopen error" )) {
106
 
            $validate_results = validateEmail( $email );
107
 
            $response_code = $validate_results[1];
108
 
            if($attempt == $max_attempts) {
109
 
                break;
110
 
            }
111
 
            $attempt++;
112
 
        }
113
 
 
114
 
        if ($validate_results[0] OR strstr($validate_results[1],"greylist")) {
115
 
            $mmsg = "MAILOK";
116
 
        }
117
 
            else {
118
 
                    Error::add('email', T_("Error Email address not confirmed")
119
 
               . "<br />$validate_results[1]");
120
 
            }
121
 
        /* End of mailcheck */
 
93
        // Check the mail for correct address formation.
 
94
        if (!Mailer::validate_address($email)) { 
 
95
            Error::add('email', T_('Invalid email address')
 
96
        }
122
97
 
123
98
        if (!$pass1) {
124
99
            Error::add('password', T_("You must enter a password"));