ModeleCaptcha
abstract class ModeleCaptcha (View source)
Parent class for password rules/management modules
Properties
| string | $id | ||
| string | $version | ||
| int | $position | ||
| string | $picto | ||
| string | $error | ||
| DoliDB | $db | ||
| Conf | $conf | ||
| Translate | $langs | ||
| User | $user |
Methods
Return if a module can be used or not
Return description of module
Return description of module
Return an example of password generated by this module
Return the HTML content to output on a form that need the captcha
Validate a captcha This function is called after a log to validate a captcha, before validating a password.
Details
isEnabled()
Return if a module can be used or not
@return boolean true if module can be used
getDescription()
Return description of module
@return string Description of module
getFieldInputTitle()
Return description of module
@return string Description of module
getExample()
Return an example of password generated by this module
@return string Example of captcha
string
getCaptchaCodeForForm($php_self = '')
Return the HTML content to output on a form that need the captcha
@param string $php_self An URL for the a href link
validateCodeAfterLoginSubmit()
Validate a captcha This function is called after a log to validate a captcha, before validating a password.
@return int 0 if KO, >0 if OK