MDL-53368 block_login: reCaptcha implementation
This commit is contained in:
@@ -77,6 +77,15 @@ class block_login extends block_base {
|
||||
$this->content->text .= ' class="form-control" value="" autocomplete="current-password"/>';
|
||||
$this->content->text .= '</div>';
|
||||
|
||||
// ReCaptcha.
|
||||
if (login_captcha_enabled()) {
|
||||
require_once($CFG->libdir . '/recaptchalib_v2.php');
|
||||
$this->content->text .= '<div class="form-group">';
|
||||
$this->content->text .= recaptcha_get_challenge_html(RECAPTCHA_API_URL, $CFG->recaptchapublickey,
|
||||
current_language(), true);
|
||||
$this->content->text .= '</div>';
|
||||
}
|
||||
|
||||
$this->content->text .= '<div class="form-group">';
|
||||
$this->content->text .= '<input type="submit" class="btn btn-primary btn-block" value="'.get_string('login').'" />';
|
||||
$this->content->text .= '</div>';
|
||||
|
||||
Reference in New Issue
Block a user