MDL-13796 Committing new recaptcha element

This commit is contained in:
nicolasconnault 2008-03-13 15:45:16 +00:00
parent 6c5a2108b5
commit 9b5f87d27e
5 changed files with 84 additions and 23 deletions

View file

@ -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');
}
}