mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-15682 Fixed, merged from MOODLE_19_STABLE
This commit is contained in:
parent
bf1fccf02b
commit
f85509b59c
@ -508,7 +508,7 @@ If you need help, please contact the site administrator,
|
||||
$a->admin';
|
||||
$string['emailpasswordconfirmationsubject'] = '$a: Change password confirmation';
|
||||
$string['emailpasswordconfirmmaybesent'] = '<p>If you supplied a correct username or email address then an email should have been sent to you.</p>
|
||||
<p>It contains easy instructions to confirm and complete this password change.
|
||||
<p>It contains easy instructions to confirm and complete this password change.
|
||||
If you continue to have difficulty, please contact the site administrator.</p>';
|
||||
$string['emailpasswordconfirmsent'] = 'An email should have been sent to your address at <b>$a</b>.
|
||||
<br />It contains easy instructions to confirm and complete this password change.
|
||||
@ -946,6 +946,7 @@ $string['missinglastname'] = 'Missing surname';
|
||||
$string['missingname'] = 'Missing name';
|
||||
$string['missingnewpassword'] = 'Missing new password';
|
||||
$string['missingpassword'] = 'Missing password';
|
||||
$string['missingrecaptchachallengefield'] = 'Missing reCAPTCHA challenge field';
|
||||
$string['missingreqreason'] = 'Missing reason';
|
||||
$string['missingshortname'] = 'Missing short name';
|
||||
$string['missingshortsitename'] = 'Missing short site name';
|
||||
|
@ -62,7 +62,7 @@ class login_signup_form extends moodleform {
|
||||
}else{
|
||||
$mform->setDefault('country', '');
|
||||
}
|
||||
|
||||
|
||||
if (signup_captcha_enabled()) {
|
||||
$mform->addElement('recaptcha', 'recaptcha_element', get_string('recaptcha', 'auth'), array('https' => $CFG->loginhttps));
|
||||
$mform->setHelpButton('recaptcha_element', array('recaptcha', get_string('recaptcha', 'auth')));
|
||||
@ -136,17 +136,23 @@ class login_signup_form extends moodleform {
|
||||
if (!check_password_policy($data['password'], $errmsg)) {
|
||||
$errors['password'] = $errmsg;
|
||||
}
|
||||
|
||||
|
||||
if (signup_captcha_enabled()) {
|
||||
$recaptcha_element = $this->_form->getElement('recaptcha_element');
|
||||
$challenge_field = $this->_form->_submitValues['recaptcha_challenge_field'];
|
||||
$response_field = $this->_form->_submitValues['recaptcha_response_field'];
|
||||
if (true !== ($result = $recaptcha_element->verify($challenge_field, $response_field))) {
|
||||
$errors['recaptcha'] = $result;
|
||||
$recaptcha_element = $this->_form->getElement('recaptcha_element');
|
||||
if (!empty($this->_form->_submitValues['recaptcha_challenge_field'])) {
|
||||
$challenge_field = $this->_form->_submitValues['recaptcha_challenge_field'];
|
||||
$response_field = $this->_form->_submitValues['recaptcha_response_field'];
|
||||
if (true !== ($result = $recaptcha_element->verify($challenge_field, $response_field))) {
|
||||
$errors['recaptcha'] = $result;
|
||||
}
|
||||
} else {
|
||||
$errors['recaptcha'] = get_string('missingrecaptchachallengefield');
|
||||
}
|
||||
}
|
||||
|
||||
return $errors;
|
||||
return $errors;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user