diff --git a/plugin/whispeakauth/WhispeakAuthPlugin.php b/plugin/whispeakauth/WhispeakAuthPlugin.php index fe5c18715f..2e60b0bb61 100644 --- a/plugin/whispeakauth/WhispeakAuthPlugin.php +++ b/plugin/whispeakauth/WhispeakAuthPlugin.php @@ -13,6 +13,7 @@ class WhispeakAuthPlugin extends Plugin const SETTING_ENABLE = 'enable'; const SETTING_TOKEN = 'token'; const SETTING_INSTRUCTION = 'instruction'; + const SETTING_MAX_ATTEMPTS = 'max_attempts'; const EXTRAFIELD_AUTH_UID = 'whispeak_auth_uid'; @@ -29,6 +30,7 @@ class WhispeakAuthPlugin extends Plugin [ self::SETTING_ENABLE => 'boolean', self::SETTING_TOKEN => 'text', + self::SETTING_MAX_ATTEMPTS => 'text', self::SETTING_INSTRUCTION => 'html', ] ); @@ -550,4 +552,14 @@ class WhispeakAuthPlugin extends Plugin return $result; } + + /** + * Get the max_attemtps option. + * + * @return int + */ + public function getMaxAttempts() + { + return (int) $this->get(self::SETTING_MAX_ATTEMPTS); + } } diff --git a/plugin/whispeakauth/lang/english.php b/plugin/whispeakauth/lang/english.php index ce2c8b11cf..b659759506 100644 --- a/plugin/whispeakauth/lang/english.php +++ b/plugin/whispeakauth/lang/english.php @@ -10,6 +10,8 @@ $strings['api_url_help'] = 'http://api.whispeak.io:8080/v1/'; $strings['token'] = 'API key'; $strings['instruction'] = '

Add $_configuration[\'whispeak_auth_enabled\'] = true;'. 'in the configuration.php file

'; +$strings['max_attempts'] = 'Max attempts'; +$strings['max_attempts_help'] = 'If the Whispeak authentication is failed x times, then ask and verify the password of the user'; $strings['EnrollmentSampleText'] = 'The famous Mona Lisa painting was painted by Leonardo Da Vinci.'; $strings['AuthentifySampleText1'] = 'Dropping Like Flies.'; diff --git a/plugin/whispeakauth/lang/french.php b/plugin/whispeakauth/lang/french.php index 74e0a2785f..baaffd1259 100644 --- a/plugin/whispeakauth/lang/french.php +++ b/plugin/whispeakauth/lang/french.php @@ -10,6 +10,8 @@ $strings['api_url_help'] = 'http://api.whispeak.io:8080/v1/'; $strings['token'] = 'API key'; $strings['instruction'] = '

Add $_configuration[\'whispeak_auth_enabled\'] = true;'. 'in the configuration.php file

'; +$strings['max_attempts'] = 'Max attempts'; +$strings['max_attempts_help'] = 'If the Whispeak authentication is failed x times, then ask and verify the password of the user'; $strings['EnrollmentSampleText'] = 'Le fameux chef-d\'oeuvre Mona Lisa a été peint par Léonardo da Vinci.'; $strings['AuthentifySampleText1'] = 'Dropping Like Flies.'; diff --git a/plugin/whispeakauth/lang/spanish.php b/plugin/whispeakauth/lang/spanish.php index 9c95d2f91f..e8ed7a9b32 100644 --- a/plugin/whispeakauth/lang/spanish.php +++ b/plugin/whispeakauth/lang/spanish.php @@ -10,6 +10,8 @@ $strings['api_url_help'] = 'http://api.whispeak.io:8080/v1/'; $strings['token'] = 'Llave del API'; $strings['instruction'] = '

Agrega $_configuration[\'whispeak_auth_enabled\'] = true;'. 'al archivo configuration.php

'; +$strings['max_attempts'] = 'Máximo de intentos'; +$strings['max_attempts_help'] = 'Si la autenticación de Whispeak falla x intentos, preguntar y verificar la contraseña del usuario'; $strings['EnrollmentSampleText'] = 'El famoso cuadro de Mona Lisa fue pintado por Leonardo Da Vinci.'; $strings['AuthentifySampleText1'] = 'Cayendo como moscas.';