mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-13796 Committing new recaptcha element
This commit is contained in:
parent
6c5a2108b5
commit
9b5f87d27e
5 changed files with 84 additions and 23 deletions
|
@ -206,6 +206,15 @@ class auth_plugin_email extends auth_plugin_base {
|
|||
set_config('recaptcha', $config->recaptcha, 'auth/email');
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the captcha element is enabled, and the admin settings fulfil its requirements.
|
||||
* @return bool
|
||||
*/
|
||||
function is_captcha_enabled() {
|
||||
global $CFG;
|
||||
return isset($CFG->recaptchapublickey) && isset($CFG->recaptchaprivatekey) && get_config("auth/{$this->authtype}", 'recaptcha');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue