From: moodler Date: Tue, 23 Dec 2003 11:58:41 +0000 (+0000) Subject: Ask for email address again to help avoid typos X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=24157e96c01d99f93c94c04ce8e87fc72f9db61e;p=moodle.git Ask for email address again to help avoid typos --- diff --git a/lang/en/moodle.php b/lang/en/moodle.php index d9ee3849e0..65472bb9b4 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -238,6 +238,7 @@ $string['editthisactivity'] = 'Edit this activity'; $string['editthiscategory'] = 'Edit this category'; $string['edituser'] = 'Edit user accounts'; $string['email'] = 'Email address'; +$string['emailagain'] = 'Email (again)'; $string['emailconfirm'] = 'Confirm your account'; $string['emailconfirmation'] = 'Hi $a->firstname, @@ -620,6 +621,7 @@ $string['potentialteachers'] = 'Potential teachers'; $string['preferredlanguage'] = 'Preferred language'; $string['preview'] = 'Preview'; $string['previeworchoose'] = 'Preview or choose a theme'; +$string['previous'] = 'Previous'; $string['publicdirectory'] = 'Public directory'; $string['publicdirectory0'] = 'Please do not publish this site'; $string['publicdirectory1'] = 'Publish the site name only'; diff --git a/login/signup.php b/login/signup.php index 3721c8b3dd..7058404284 100644 --- a/login/signup.php +++ b/login/signup.php @@ -94,31 +94,45 @@ function validate_form($user, &$err) { } - if (empty($user->password)) + if (empty($user->password)) { $err->password = get_string("missingpassword"); + } - if (empty($user->firstname)) + if (empty($user->firstname)) { $err->firstname = get_string("missingfirstname"); + } - if (empty($user->lastname)) + if (empty($user->lastname)) { $err->lastname = get_string("missinglastname"); + } - if (empty($user->email)) + if (empty($user->email)) { $err->email = get_string("missingemail"); - else if (! validate_email($user->email)) + } else if (! validate_email($user->email)) { $err->email = get_string("invalidemail"); - else if (record_exists("user", "email", $user->email)) + } else if (record_exists("user", "email", $user->email)) { $err->email = get_string("emailexists")." ".get_string("newpassword")."?"; + } + + if (empty($user->email2)) { + $err->email2 = get_string("missingemail"); - if (empty($user->city)) + } else if ($user->email2 != $user->email) { + $err->email2 = get_string("invalidemail"); + } + + + if (empty($user->city)) { $err->city = get_string("missingcity"); + } - if (empty($user->country)) + if (empty($user->country)) { $err->country = get_string("missingcountry"); + } return; } diff --git a/login/signup_form.html b/login/signup_form.html index 53e7f446ef..d2d446f6e2 100644 --- a/login/signup_form.html +++ b/login/signup_form.html @@ -30,13 +30,13 @@

:

-

:

+

:

username)) { formerr($err->username); } ?> -

:

+

:

password)) { formerr($err->password); } ?> @@ -48,31 +48,37 @@ -

:

+

:

email)) { formerr($err->email); } ?> -

:

+

:

+ + email2)) { formerr($err->email2); } ?> + + + +

:

firstname)) { formerr($err->firstname);} ?> -

:

+

:

lastname)) { formerr($err->lastname);} ?> -

:

+

:

city)) { formerr($err->city);} ?> -

:

+

:

country, get_string("selectacountry"), "", "") ?> country)) { formerr($err->country);} ?>