Permalink
Browse files

MDL-46976 user: trim whitespace from input email address

Don't complain about invalid email address, we are a computer, we
love the jobs users hate.

ref: https://www.youtube.com/watch?v=5tquSbZEP-g
  • Loading branch information...
danpoltawski committed Jan 14, 2015
1 parent f2c730f commit 1dcf25db8b3cac0da4ecb3a22962e9f893759680
Showing with 4 additions and 4 deletions.
  1. +1 −1 login/forgot_password_form.php
  2. +2 −2 login/signup_form.php
  3. +1 −1 user/editlib.php
@@ -54,7 +54,7 @@ function definition() {
$mform->addElement('header', 'searchbyemail', get_string('searchbyemail'), '');
$mform->addElement('text', 'email', get_string('email'));
$mform->setType('email', PARAM_RAW);
$mform->setType('email', PARAM_RAW_TRIMMED);
$submitlabel = get_string('search');
$mform->addElement('submit', 'submitbuttonemail', $submitlabel);
View
@@ -53,11 +53,11 @@ function definition() {
$mform->addElement('header', 'supplyinfo', get_string('supplyinfo'),'');
$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="25"');
$mform->setType('email', PARAM_NOTAGS);
$mform->setType('email', PARAM_RAW_TRIMMED);
$mform->addRule('email', get_string('missingemail'), 'required', null, 'server');
$mform->addElement('text', 'email2', get_string('emailagain'), 'maxlength="100" size="25"');
$mform->setType('email2', PARAM_NOTAGS);
$mform->setType('email2', PARAM_RAW_TRIMMED);
$mform->addRule('email2', get_string('missingemail'), 'required', null, 'server');
$namefields = useredit_get_required_name_fields();
View
@@ -215,7 +215,7 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager
} else {
$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="30"');
$mform->addRule('email', $strrequired, 'required', null, 'client');
$mform->setType('email', PARAM_EMAIL);
$mform->setType('email', PARAM_RAW_TRIMMED);
}
$mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="21"');

0 comments on commit 1dcf25d

Please sign in to comment.