MDL-55873 login: change back username fields to use PARAM_RAW

This commit is contained in:
Simey Lameze
2016-09-12 11:49:14 +08:00
parent 0344082208
commit 90d8bf59e7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ class login_signup_form extends moodleform {
$mform->addElement('text', 'username', get_string('username'), 'maxlength="100" size="12"');
$mform->setType('username', core_user::get_property_type('username'));
$mform->setType('username', PARAM_RAW);
$mform->addRule('username', get_string('missingusername'), 'required', null, 'client');
if (!empty($CFG->passwordpolicy)){
+1 -1
View File
@@ -98,7 +98,7 @@ class user_editadvanced_form extends moodleform {
$mform->addElement('text', 'username', get_string('username'), 'size="20"');
$mform->addHelpButton('username', 'username', 'auth');
$mform->setType('username', core_user::get_property_type('username'));
$mform->setType('username', PARAM_RAW);
if ($userid !== -1) {
$mform->disabledIf('username', 'auth', 'in', $cannotchangeusername);