MDL-15682 Fixed
This commit is contained in:
@@ -942,6 +942,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';
|
||||
@@ -1175,8 +1176,8 @@ $string['phone2'] = 'Mobile Phone';
|
||||
$string['phpinfo'] = 'PHP info';
|
||||
$string['pleaseclose'] = 'Please close this window now.';
|
||||
$string['plugincheck'] = 'Plugins check';
|
||||
$string['pluginchecknotice'] = 'The following tables show the modules, blocks and filters that have been detected in your current Moodle installation;
|
||||
They indicate which plugins are standard, and which are not. All non-standard plugins should be checked and upgraded to their most recent versions
|
||||
$string['pluginchecknotice'] = 'The following tables show the modules, blocks and filters that have been detected in your current Moodle installation;
|
||||
They indicate which plugins are standard, and which are not. All non-standard plugins should be checked and upgraded to their most recent versions
|
||||
before continuing with this Moodle upgrade.';
|
||||
$string['pluginsetup'] = 'Setting up plugin tables';
|
||||
$string['policyaccept'] = 'I understand and agree';
|
||||
|
||||
+12
-8
@@ -62,10 +62,10 @@ 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')));
|
||||
$mform->setHelpButton('recaptcha_element', array('recaptcha', get_string('recaptcha', 'auth')));
|
||||
}
|
||||
|
||||
profile_signup_fields($mform);
|
||||
@@ -136,13 +136,17 @@ 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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user