Move key lifetime error to the string file

This commit is contained in:
Dmitrii Metelkin 2016-08-19 10:53:36 +10:00
parent 56a1728b1a
commit 8e1ecdb7b6
2 changed files with 2 additions and 1 deletions

View file

@ -190,7 +190,7 @@ class auth_plugin_userkey extends auth_plugin_base {
*/
public function validate_form($form, &$err) {
if ((int)$form->keylifetime == 0) {
$err['keylifetime'] = 'User key life time should be a number.';
$err['keylifetime'] = get_string('incorrectkeylifetime', 'auth_userkey');
}
if (!empty($form->redirecturl) && filter_var($form->redirecturl, FILTER_VALIDATE_URL) === false) {

View file

@ -30,6 +30,7 @@ $string['iprestriction'] = 'IP restriction';
$string['iprestriction_desc'] = 'If enabled, a user should use the same remote ip to get login URL and logging to to LMS.';
$string['keylifetime'] = 'User key life time';
$string['keylifetime_desc'] = 'Life time in seconds of the each user login key.';
$string['incorrectkeylifetime'] = 'User key life time should be a number';
$string['createuser'] = 'Crete user?';
$string['createuser_desc'] = 'If enabled, a new user will be created if fail to find one in LMS.';
$string['redirecturl'] = 'Logout redirect URL';