From 5f6a3a8c8114726486668e2ee816dd48bfa0a8fa Mon Sep 17 00:00:00 2001 From: Dmitrii Metelkin Date: Thu, 18 Aug 2016 21:49:27 +1000 Subject: [PATCH] Move error text to a string file --- externallib.php | 2 +- lang/en/auth_userkey.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/externallib.php b/externallib.php index 82d4d3e..dbee67f 100644 --- a/externallib.php +++ b/externallib.php @@ -56,7 +56,7 @@ class auth_userkey_external extends external_api { public static function request_login_url($user) { if (!is_enabled_auth('userkey')) { - throw new webservice_access_exception('The userkey authentication plugin is disabled.'); + throw new webservice_access_exception(get_string('pluginisdisabled', 'auth_userkey')); } $context = context_system::instance(); diff --git a/lang/en/auth_userkey.php b/lang/en/auth_userkey.php index 8ca8f4a..3a5165a 100644 --- a/lang/en/auth_userkey.php +++ b/lang/en/auth_userkey.php @@ -32,4 +32,5 @@ $string['keylifetime'] = 'User key life time'; $string['keylifetime_desc'] = 'Life time in seconds of the each user login key.'; $string['createuser'] = 'Crete user?'; $string['createuser_desc'] = 'If enabled, a new user will be created if fail to find one in LMS.'; -$string['userkey:generatekey'] = 'Generate login user key'; \ No newline at end of file +$string['userkey:generatekey'] = 'Generate login user key'; +$string['pluginisdisabled'] = 'The userkey authentication plugin is disabled.'; \ No newline at end of file