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

isEnabled()

Return if a module can be used or not

getDescription()

Return description of module

getFieldInputTitle()

Return description of module

getExample()

Return an example of password generated by this module

string
getCaptchaCodeForForm($php_self = '')

Return the HTML content to output on a form that need the captcha

validateCodeAfterLoginSubmit()

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

Parameters

$php_self

Return Value

string

The HTML code to output

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