From 2b06294b9a8c7c6d5da62111d989a89af4358689 Mon Sep 17 00:00:00 2001 From: jerome Date: Thu, 11 Jun 2009 03:34:46 +0000 Subject: [PATCH] authentication MDL-19182 split auth.php lang file into multiple files separate for each plugin --- auth/cas/auth.php | 24 +- auth/cas/cas_form.html | 4 +- auth/cas/config.html | 104 +++--- auth/db/auth.php | 30 +- auth/db/config.html | 56 +-- auth/email/auth.php | 4 +- auth/email/config.html | 6 +- auth/fc/config.html | 22 +- auth/fc/fcFPP.php | 2 +- auth/imap/config.html | 14 +- auth/ldap/auth.php | 48 +-- auth/ldap/config.html | 118 +++---- auth/ldap/ntlmsso_attempt.php | 4 +- auth/ldap/ntlmsso_finish.php | 4 +- auth/ldap/ntlmsso_magic.php | 4 +- auth/mnet/config.html | 12 +- auth/nntp/auth.php | 2 +- auth/nntp/config.html | 10 +- auth/pop3/auth.php | 2 +- auth/pop3/config.html | 18 +- auth/radius/config.html | 26 +- auth/shibboleth/auth.php | 2 +- auth/shibboleth/config.html | 34 +- auth/shibboleth/index_form.html | 8 +- auth/shibboleth/login.php | 2 +- lang/en_utf8/auth.php | 332 ------------------ lang/en_utf8/auth_cas.php | 38 ++ lang/en_utf8/auth_db.php | 46 +++ lang/en_utf8/auth_email.php | 25 ++ lang/en_utf8/auth_fc.php | 17 + lang/en_utf8/auth_imap.php | 13 + lang/en_utf8/auth_ldap.php | 93 +++++ lang/en_utf8/auth_manual.php | 5 + lang/en_utf8/auth_mnet.php | 9 + lang/en_utf8/auth_nntp.php | 11 + lang/en_utf8/auth_nologin.php | 6 + lang/en_utf8/auth_none.php | 6 + lang/en_utf8/auth_pam.php | 9 + lang/en_utf8/auth_pop3.php | 15 + lang/en_utf8/auth_radius.php | 19 + lang/en_utf8/auth_shibboleth.php | 37 ++ .../admin_index.php_get_string.log.php | 30 +- .../admin_index.php_old_get_string.log.php | 30 +- user/edit.php | 6 +- user/editlib.php | 4 +- user/emailupdate.php | 10 +- 46 files changed, 669 insertions(+), 652 deletions(-) create mode 100644 lang/en_utf8/auth_cas.php create mode 100644 lang/en_utf8/auth_db.php create mode 100644 lang/en_utf8/auth_email.php create mode 100644 lang/en_utf8/auth_fc.php create mode 100644 lang/en_utf8/auth_imap.php create mode 100644 lang/en_utf8/auth_ldap.php create mode 100644 lang/en_utf8/auth_manual.php create mode 100644 lang/en_utf8/auth_nntp.php create mode 100644 lang/en_utf8/auth_nologin.php create mode 100644 lang/en_utf8/auth_none.php create mode 100644 lang/en_utf8/auth_pam.php create mode 100644 lang/en_utf8/auth_pop3.php create mode 100644 lang/en_utf8/auth_radius.php create mode 100644 lang/en_utf8/auth_shibboleth.php diff --git a/auth/cas/auth.php b/auth/cas/auth.php index 2c15875199..919e84bfae 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -89,7 +89,7 @@ class auth_plugin_cas extends auth_plugin_base { global $SESSION; $site = get_site(); - $CASform = get_string("CASform","auth"); + $CASform = get_string("CASform","auth_cas"); $username = optional_param("username"); if (!empty($username)) { @@ -636,7 +636,7 @@ if ( !is_object($PHPCAS_CLIENT) ) { if (!$ldapconnection) { $this->ldap_close($ldapconnection); - print get_string('auth_ldap_noconnect','auth',$this->config->host_url); + print get_string('auth_ldap_noconnect','auth_ldap',$this->config->host_url); exit; } @@ -710,18 +710,18 @@ if ( !is_object($PHPCAS_CLIENT) ) { foreach ($remove_users as $user) { if ($this->config->removeuser == AUTH_REMOVEUSER_FULLDELETE) { if (delete_user($user)) { - echo "\t"; print_string('auth_dbdeleteuser', 'auth', array($user->username, $user->id)); echo "\n"; + echo "\t"; print_string('auth_dbdeleteuser', 'auth_db', array($user->username, $user->id)); echo "\n"; } else { - echo "\t"; print_string('auth_dbdeleteusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbdeleteusererror', 'auth_db', $user->username); echo "\n"; } } else if ($this->config->removeuser == AUTH_REMOVEUSER_SUSPEND) { $updateuser = new object(); $updateuser->id = $user->id; $updateuser->auth = 'nologin'; if ($DB->update_record('user', $updateuser)) { - echo "\t"; print_string('auth_dbsuspenduser', 'auth', array($user->username, $user->id)); echo "\n"; + echo "\t"; print_string('auth_dbsuspenduser', 'auth_db', array($user->username, $user->id)); echo "\n"; } else { - echo "\t"; print_string('auth_dbsuspendusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbsuspendusererror', 'auth_db', $user->username); echo "\n"; } } } @@ -747,9 +747,9 @@ if ( !is_object($PHPCAS_CLIENT) ) { $updateuser->id = $user->id; $updateuser->auth = 'ldap'; if ($DB->pdate_record('user', $updateuser)) { - echo "\t"; print_string('auth_dbreviveser', 'auth', array($user->username, $user->id)); echo "\n"; + echo "\t"; print_string('auth_dbreviveser', 'auth_db', array($user->username, $user->id)); echo "\n"; } else { - echo "\t"; print_string('auth_dbreviveusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbreviveusererror', 'auth_db', $user->username); echo "\n"; } } } else { @@ -802,7 +802,7 @@ if ( !is_object($PHPCAS_CLIENT) ) { $maxxcount = 100; foreach ($users as $user) { - echo "\t"; print_string('auth_dbupdatinguser', 'auth', array($user->username, $user->id)); + echo "\t"; print_string('auth_dbupdatinguser', 'auth_db', array($user->username, $user->id)); if (!$this->update_user_record($user->username, $updatekeys)) { echo " - ".get_string('skipped'); } @@ -866,13 +866,13 @@ if ( !is_object($PHPCAS_CLIENT) ) { } if ($id = $DB->insert_record('user', $user)) { - echo "\t"; print_string('auth_dbinsertuser', 'auth', array($user->username, $id)); echo "\n"; + echo "\t"; print_string('auth_dbinsertuser', 'auth_db', array($user->username, $id)); echo "\n"; $userobj = $this->update_user_record($user->username); if (!empty($this->config->forcechangepassword)) { set_user_preference('auth_forcepasswordchange', 1, $userobj->id); } } else { - echo "\t"; print_string('auth_dbinsertusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbinsertusererror', 'auth_db', $user->username); echo "\n"; } // add course creators if needed @@ -912,7 +912,7 @@ if ( !is_object($PHPCAS_CLIENT) ) { $user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id)); if (empty($user)) { // trouble error_log("Cannot update non-existent user: ".$username); - print_error('auth_dbusernotexist','auth','',$username); + print_error('auth_dbusernotexist','auth_db','',$username); die; } diff --git a/auth/cas/cas_form.html b/auth/cas/cas_form.html index 9beb74b28f..146caaa277 100644 --- a/auth/cas/cas_form.html +++ b/auth/cas/cas_form.html @@ -6,7 +6,7 @@
- +
@@ -14,7 +14,7 @@
- +
diff --git a/auth/cas/config.html b/auth/cas/config.html index 1afbc6074b..2ae5721014 100644 --- a/auth/cas/config.html +++ b/auth/cas/config.html @@ -122,7 +122,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - notify(get_string('auth_ldap_noextension','auth')); + notify(get_string('auth_ldap_noextension','auth_ldap')); } @@ -142,7 +142,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? -

+

@@ -150,7 +150,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - : + : @@ -172,7 +172,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -180,7 +180,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - : + : @@ -202,7 +202,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -210,7 +210,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - : + : @@ -232,7 +232,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -240,7 +240,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - : + : @@ -262,7 +262,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -270,7 +270,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - : + : @@ -286,7 +286,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -294,7 +294,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - : + : @@ -310,7 +310,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -318,7 +318,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - : + : @@ -334,7 +334,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -342,7 +342,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - : + : @@ -358,7 +358,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -368,7 +368,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? -

+

@@ -378,7 +378,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -390,7 +390,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -400,7 +400,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -422,7 +422,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -432,7 +432,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -454,7 +454,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -464,7 +464,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? -

+

@@ -474,7 +474,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -484,7 +484,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -494,7 +494,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -504,7 +504,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -516,7 +516,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? -

+

@@ -526,7 +526,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -538,7 +538,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -548,7 +548,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -560,7 +560,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -570,7 +570,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -580,7 +580,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -590,7 +590,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -612,7 +612,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -626,7 +626,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -638,7 +638,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -648,7 +648,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -658,7 +658,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -668,7 +668,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -678,7 +678,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -688,7 +688,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -700,7 +700,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -722,7 +722,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -732,7 +732,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -742,7 +742,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -752,7 +752,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -806,7 +806,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? -$help = get_string('auth_ldapextrafields','auth'); +$help = get_string('auth_ldapextrafields','auth_ldap'); $help .= get_string('auth_updatelocal_expl','auth'); diff --git a/auth/db/auth.php b/auth/db/auth.php index c0f57aff6f..a88a9f50b6 100644 --- a/auth/db/auth.php +++ b/auth/db/auth.php @@ -60,7 +60,7 @@ class auth_plugin_db extends auth_plugin_base { WHERE {$this->config->fielduser} = '".$this->ext_addslashes($extusername)."' "); if (!$rs) { $authdb->Close(); - print_error('auth_dbcantconnect','auth'); + print_error('auth_dbcantconnect','auth_db'); return false; } @@ -93,7 +93,7 @@ class auth_plugin_db extends auth_plugin_base { AND {$this->config->fieldpass} = '".$this->ext_addslashes($extpassword)."' "); if (!$rs) { $authdb->Close(); - print_error('auth_dbcantconnect','auth'); + print_error('auth_dbcantconnect','auth_db'); return false; } @@ -249,23 +249,23 @@ class auth_plugin_db extends auth_plugin_base { $remove_users = $DB->get_records_sql($sql); if (!empty($remove_users)) { - print_string('auth_dbuserstoremove','auth', count($remove_users)); echo "\n"; + print_string('auth_dbuserstoremove','auth_db', count($remove_users)); echo "\n"; foreach ($remove_users as $user) { if ($this->config->removeuser == AUTH_REMOVEUSER_FULLDELETE) { if (delete_user($user)) { - echo "\t"; print_string('auth_dbdeleteuser', 'auth', array($user->username, $user->id)); echo "\n"; + echo "\t"; print_string('auth_dbdeleteuser', 'auth_db', array($user->username, $user->id)); echo "\n"; } else { - echo "\t"; print_string('auth_dbdeleteusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbdeleteusererror', 'auth_db', $user->username); echo "\n"; } } else if ($this->config->removeuser == AUTH_REMOVEUSER_SUSPEND) { $updateuser = new object(); $updateuser->id = $user->id; $updateuser->auth = 'nologin'; if ($DB->update_record('user', $updateuser)) { - echo "\t"; print_string('auth_dbsuspenduser', 'auth', array($user->username, $user->id)); echo "\n"; + echo "\t"; print_string('auth_dbsuspenduser', 'auth_db', array($user->username, $user->id)); echo "\n"; } else { - echo "\t"; print_string('auth_dbsuspendusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbsuspendusererror', 'auth_db', $user->username); echo "\n"; } } } @@ -306,7 +306,7 @@ class auth_plugin_db extends auth_plugin_base { print "User entries to update: ". count($update_users). "\n"; foreach ($update_users as $user) { - echo "\t"; print_string('auth_dbupdatinguser', 'auth', array($user->username, $user->id)); + echo "\t"; print_string('auth_dbupdatinguser', 'auth_db', array($user->username, $user->id)); if (!$this->update_user_record($user->username, $updatekeys)) { echo " - ".get_string('skipped'); } @@ -342,7 +342,7 @@ class auth_plugin_db extends auth_plugin_base { unset($usernames); if (!empty($add_users)) { - print_string('auth_dbuserstoadd','auth',count($add_users)); echo "\n"; + print_string('auth_dbuserstoadd','auth_db',count($add_users)); echo "\n"; $DB->begin_sql(); foreach($add_users as $user) { $username = $user; @@ -362,16 +362,16 @@ class auth_plugin_db extends auth_plugin_base { if ($old_user = $DB->get_record('user', array('username'=>$user->username, 'deleted'=>1, 'mnethostid'=>$user->mnethostid))) { $user->id = $old_user->id; $DB->set_field('user', 'deleted', 0, array('username'=>$user->username)); - echo "\t"; print_string('auth_dbreviveuser', 'auth', array($user->username, $user->id)); echo "\n"; + echo "\t"; print_string('auth_dbreviveuser', 'auth_db', array($user->username, $user->id)); echo "\n"; } elseif ($id = $DB->insert_record ('user',$user)) { // it is truly a new user - echo "\t"; print_string('auth_dbinsertuser','auth',array($user->username, $id)); echo "\n"; + echo "\t"; print_string('auth_dbinsertuser','auth_db',array($user->username, $id)); echo "\n"; // if relevant, tag for password generation if ($this->config->passtype === 'internal') { set_user_preference('auth_forcepasswordchange', 1, $id); set_user_preference('create_password', 1, $id); } } else { - echo "\t"; print_string('auth_dbinsertusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbinsertusererror', 'auth_db', $user->username); echo "\n"; } } $DB->commit_sql(); @@ -394,7 +394,7 @@ class auth_plugin_db extends auth_plugin_base { WHERE {$this->config->fielduser} = '".$this->ext_addslashes($extusername)."' "); if (!$rs) { - print_error('auth_dbcantconnect','auth'); + print_error('auth_dbcantconnect','auth_db'); } else if ( !$rs->EOF ) { // user exists exterally $result = true; @@ -417,7 +417,7 @@ class auth_plugin_db extends auth_plugin_base { FROM {$this->config->table} "); if (!$rs) { - print_error('auth_dbcantconnect','auth'); + print_error('auth_dbcantconnect','auth_db'); } else if ( !$rs->EOF ) { while ($rec = $rs->FetchRow()) { $rec = (object)array_change_key_case((array)$rec , CASE_LOWER); @@ -464,7 +464,7 @@ class auth_plugin_db extends auth_plugin_base { $user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id)); if (empty($user)) { // trouble error_log("Cannot update non-existent user: $username"); - print_error('auth_dbusernotexist','auth',$username); + print_error('auth_dbusernotexist','auth_db',$username); die; } diff --git a/auth/db/config.html b/auth/db/config.html index d7aea3f814..25a0d86703 100644 --- a/auth/db/config.html +++ b/auth/db/config.html @@ -53,7 +53,7 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
- +
sybasequoting, ''); ?>
- +
debugauthdb, ''); ?>
diff --git a/auth/email/auth.php b/auth/email/auth.php index 75e4bf476f..7f0bf5b066 100644 --- a/auth/email/auth.php +++ b/auth/email/auth.php @@ -80,7 +80,7 @@ class auth_plugin_email extends auth_plugin_base { $user->password = hash_internal_user_password($user->password); if (! ($user->id = $DB->insert_record('user', $user)) ) { - print_error('auth_emailnoinsert','auth'); + print_error('auth_emailnoinsert','auth_email'); } /// Save any custom profile field information @@ -90,7 +90,7 @@ class auth_plugin_email extends auth_plugin_base { events_trigger('user_created', $user); if (! send_confirmation_email($user)) { - print_error('auth_emailnoemail','auth'); + print_error('auth_emailnoemail','auth_email'); } if ($notify) { diff --git a/auth/email/config.html b/auth/email/config.html index 71b9536780..8b6b829030 100644 --- a/auth/email/config.html +++ b/auth/email/config.html @@ -12,13 +12,13 @@ - + - + - + - + - + - + - + - +
-

+

recaptcha, ''); ?>
:: - +
:: - +
:: - +
:: - +
:: - +
: : changepasswordurl)) { - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -280,7 +280,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + - + - + - + - + - + - + - + @@ -387,7 +387,7 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -397,12 +397,12 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -414,12 +414,12 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + @@ -447,44 +447,44 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - + - + - + config->ntlmsso_enabled)) { - print_error('ntlmsso_isdisabled','auth'); + print_error('ntlmsso_isdisabled','auth_ldap'); } $sesskey = sesskey(); @@ -31,7 +31,7 @@ $navlinks = array(array('name' => $loginsite, 'link' => null, 'type' => 'misc')) $navigation = build_navigation($navlinks); print_header("$site->fullname: $loginsite", $site->fullname, $navigation, '', '', true); -$msg = '

'.get_string('ntlmsso_attempting','auth').'

' +$msg = '

'.get_string('ntlmsso_attempting','auth_ldap').'

' . ''; diff --git a/auth/ldap/ntlmsso_finish.php b/auth/ldap/ntlmsso_finish.php index fe613cc33b..b0353e8ee9 100644 --- a/auth/ldap/ntlmsso_finish.php +++ b/auth/ldap/ntlmsso_finish.php @@ -17,7 +17,7 @@ if (!in_array('ldap',$authsequence,true)) { $authplugin = get_auth_plugin('ldap'); if (empty($authplugin->config->ntlmsso_enabled)) { - print_error('ntlmsso_isdisabled','auth'); + print_error('ntlmsso_isdisabled','auth_ldap'); } // If ntlmsso_finish() succeeds, then the code never returns, @@ -31,6 +31,6 @@ if (!$authplugin->ntlmsso_finish()) { $navigation = build_navigation($navlinks); print_header("$site->fullname: $loginsite", $site->fullname, $navigation, '', '', true); redirect($CFG->httpswwwroot . '/login/index.php?authldap_skipntlmsso=1', - get_string('ntlmsso_failed','auth'), 3); + get_string('ntlmsso_failed','auth_ldap'), 3); } ?> diff --git a/auth/ldap/ntlmsso_magic.php b/auth/ldap/ntlmsso_magic.php index c04919a3f5..8636a913c3 100644 --- a/auth/ldap/ntlmsso_magic.php +++ b/auth/ldap/ntlmsso_magic.php @@ -18,7 +18,7 @@ if (!in_array('ldap',$authsequence,true)) { $authplugin = get_auth_plugin('ldap'); if (empty($authplugin->config->ntlmsso_enabled)) { - print_error('ntlmsso_isdisabled','auth'); + print_error('ntlmsso_isdisabled','auth_ldap'); } $sesskey = required_param('sesskey', PARAM_RAW); @@ -44,7 +44,7 @@ if ($authplugin->ntlmsso_magic($sesskey) fclose($handle); exit; } else { - print_error('ntlmsso_iwamagicnotenabled','auth'); + print_error('ntlmsso_iwamagicnotenabled','auth_ldap'); } ?> diff --git a/auth/mnet/config.html b/auth/mnet/config.html index fb87bc40fe..75c5aa524e 100644 --- a/auth/mnet/config.html +++ b/auth/mnet/config.html @@ -19,7 +19,7 @@ if (empty($CFG->mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
: : changepasswordurl)) { @@ -40,7 +40,7 @@ if (!isset($config->changepasswordurl)) {
: : changepasswordurl)) { ?>
: : changepasswordurl)) { ?>
: : ldap_close(); - print_error('auth_ldap_noconnect','auth','',$this->config->host_url); + print_error('auth_ldap_noconnect','auth_ldap','',$this->config->host_url); } return false; } @@ -355,7 +355,7 @@ class auth_plugin_ldap extends auth_plugin_base { // strings (UCS-2 Little Endian format) and surrounded with // double quotes. See http://support.microsoft.com/?kbid=269190 if (!function_exists('mb_convert_encoding')) { - print_error('auth_ldap_no_mbstring', 'auth'); + print_error('auth_ldap_no_mbstring', 'auth_ldap'); } // First create the user account, and mark it as disabled. @@ -366,7 +366,7 @@ class auth_plugin_ldap extends auth_plugin_base { $userdn = 'cn=' . $this->ldap_addslashes($extusername) . ',' . $this->config->create_context; if (!ldap_add($ldapconnection, $userdn, $newuser)) { - print_error('auth_ldap_ad_create_req', 'auth'); + print_error('auth_ldap_ad_create_req', 'auth_ldap'); } // Now set the password @@ -376,12 +376,12 @@ class auth_plugin_ldap extends auth_plugin_base { if(!ldap_modify($ldapconnection, $userdn, $newuser)) { // Something went wrong: delete the user account and error out ldap_delete ($ldapconnection, $userdn); - print_error('auth_ldap_ad_create_req', 'auth'); + print_error('auth_ldap_ad_create_req', 'auth_ldap'); } $uadd = true; break; default: - print_error('auth_ldap_unsupportedusertype','auth','',$this->config->user_type); + print_error('auth_ldap_unsupportedusertype','auth_ldap','',$this->config->user_type); } $this->ldap_close(); return $uadd; @@ -409,18 +409,18 @@ class auth_plugin_ldap extends auth_plugin_base { require_once($CFG->dirroot.'/user/profile/lib.php'); if ($this->user_exists($user->username)) { - print_error('auth_ldap_user_exists', 'auth'); + print_error('auth_ldap_user_exists', 'auth_ldap'); } $plainslashedpassword = $user->password; unset($user->password); if (! $this->user_create($user, $plainslashedpassword)) { - print_error('auth_ldap_create_error', 'auth'); + print_error('auth_ldap_create_error', 'auth_ldap'); } if (! ($user->id = $DB->insert_record('user', $user)) ) { - print_error('auth_emailnoinsert', 'auth'); + print_error('auth_emailnoinsert', 'auth_email'); } /// Save any custom profile field information @@ -433,7 +433,7 @@ class auth_plugin_ldap extends auth_plugin_base { events_trigger('user_created', $user); if (! send_confirmation_email($user)) { - print_error('auth_emailnoemail', 'auth'); + print_error('auth_emailnoemail', 'auth_email'); } if ($notify) { @@ -569,7 +569,7 @@ class auth_plugin_ldap extends auth_plugin_base { if (!$ldapconnection) { $this->ldap_close(); - print get_string('auth_ldap_noconnect','auth',$this->config->host_url); + print get_string('auth_ldap_noconnect','auth_ldap',$this->config->host_url); exit; } @@ -643,18 +643,18 @@ class auth_plugin_ldap extends auth_plugin_base { foreach ($remove_users as $user) { if ($this->config->removeuser == AUTH_REMOVEUSER_FULLDELETE) { if (delete_user($user)) { - echo "\t"; print_string('auth_dbdeleteuser', 'auth', array($user->username, $user->id)); echo "\n"; + echo "\t"; print_string('auth_dbdeleteuser', 'auth_db', array($user->username, $user->id)); echo "\n"; } else { - echo "\t"; print_string('auth_dbdeleteusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbdeleteusererror', 'auth_db', $user->username); echo "\n"; } } else if ($this->config->removeuser == AUTH_REMOVEUSER_SUSPEND) { $updateuser = new object(); $updateuser->id = $user->id; $updateuser->auth = 'nologin'; if ($DB->update_record('user', $updateuser)) { - echo "\t"; print_string('auth_dbsuspenduser', 'auth', array($user->username, $user->id)); echo "\n"; + echo "\t"; print_string('auth_dbsuspenduser', 'auth_db', array($user->username, $user->id)); echo "\n"; } else { - echo "\t"; print_string('auth_dbsuspendusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbsuspendusererror', 'auth_db', $user->username); echo "\n"; } } } @@ -680,9 +680,9 @@ class auth_plugin_ldap extends auth_plugin_base { $updateuser->id = $user->id; $updateuser->auth = 'ldap'; if ($DB->pdate_record('user', $updateuser)) { - echo "\t"; print_string('auth_dbreviveser', 'auth', array($user->username, $user->id)); echo "\n"; + echo "\t"; print_string('auth_dbreviveser', 'auth_db', array($user->username, $user->id)); echo "\n"; } else { - echo "\t"; print_string('auth_dbreviveusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbreviveusererror', 'auth_db', $user->username); echo "\n"; } } } else { @@ -735,7 +735,7 @@ class auth_plugin_ldap extends auth_plugin_base { $maxxcount = 100; foreach ($users as $user) { - echo "\t"; print_string('auth_dbupdatinguser', 'auth', array($user->username, $user->id)); + echo "\t"; print_string('auth_dbupdatinguser', 'auth_db', array($user->username, $user->id)); if (!$this->update_user_record($user->username, $updatekeys)) { echo " - ".get_string('skipped'); } @@ -803,13 +803,13 @@ class auth_plugin_ldap extends auth_plugin_base { } if ($id = $DB->insert_record('user', $user)) { - echo "\t"; print_string('auth_dbinsertuser', 'auth', array($user->username, $id)); echo "\n"; + echo "\t"; print_string('auth_dbinsertuser', 'auth_db', array($user->username, $id)); echo "\n"; $userobj = $this->update_user_record($user->username); if (!empty($this->config->forcechangepassword)) { set_user_preference('auth_forcepasswordchange', 1, $userobj->id); } } else { - echo "\t"; print_string('auth_dbinsertusererror', 'auth', $user->username); echo "\n"; + echo "\t"; print_string('auth_dbinsertusererror', 'auth_db', $user->username); echo "\n"; } // add course creators if needed @@ -849,7 +849,7 @@ class auth_plugin_ldap extends auth_plugin_base { $user = $DB->get_record('user', array('username'=>$username, 'mnethostid'=>$CFG->mnet_localhost_id)); if (empty($user)) { // trouble error_log("Cannot update non-existent user: ".$username); - print_error('auth_dbusernotexist','auth','',$username); + print_error('auth_dbusernotexist','auth_db','',$username); die; } @@ -1416,7 +1416,7 @@ class auth_plugin_ldap extends auth_plugin_base { $result = $this->ldap_get_ad_pwdexpire($time, $ldapconnection, $user_dn); break; default: - print_error('auth_ldap_usertypeundefined', 'auth'); + print_error('auth_ldap_usertypeundefined', 'auth_ldap'); } return $result; } @@ -1437,7 +1437,7 @@ class auth_plugin_ldap extends auth_plugin_base { $result = $time ; //Already in correct format break; default: - print_error('auth_ldap_usertypeundefined2', 'auth'); + print_error('auth_ldap_usertypeundefined2', 'auth_ldap'); } return $result; @@ -1585,7 +1585,7 @@ class auth_plugin_ldap extends auth_plugin_base { } //If any of servers are alive we have already returned connection - print_error('auth_ldap_noconnect_all','auth','', $debuginfo); + print_error('auth_ldap_noconnect_all','auth_ldap','', $debuginfo); return false; } diff --git a/auth/ldap/config.html b/auth/ldap/config.html index 594966a2f7..155832023e 100644 --- a/auth/ldap/config.html +++ b/auth/ldap/config.html @@ -65,7 +65,7 @@ $yesno = array( get_string('no'), get_string('yes') ); if (!function_exists('ldap_connect')) { // Is php4-ldap really there? - notify(get_string('auth_ldap_noextension','auth')); + notify(get_string('auth_ldap_noextension','auth_ldap')); } ?> @@ -73,23 +73,23 @@ if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
-

+

- +
- +
-

+

preventpassindb, ''); ?> - +
- +
- +
-

+

ldap_suppported_usertypes(), 'user_type', $config->user_type, ''); ?> - +
- +
search_sub, ''); ?> - +
- +
- +
- +
- +
- +
-

+

- +
- +
- +
gracelogins, ''); ?> - +
- +
auth_user_create, ''); ?>
- +
- +
-

+

ntlmsso_enabled, '0'); ?> - +
- +
ntlmsso_ie_fastpath, '0'); ?> - +
- + - + - + - + changepasswordurl)) {
: : mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
: : mnet_dispatcher_mode) || $CFG->mnet_dispatcher_mode !== 'strict'
: :
: :
- + - + - + - +
: : changepasswordurl)) { @@ -37,7 +37,7 @@ if (!isset($config->changepasswordurl)) {
: : changepasswordurl)) { ?>
: : changepasswordurl)) { - + - + - + - + - + - + - + - +
: : changepasswordurl)) { @@ -43,7 +43,7 @@ if (!isset($config->changepasswordurl)) {
: : changepasswordurl)) { ?>
: : changepasswordurl)) { ?>
: : changepasswordurl)) { ?>
: : changepasswordurl)) { - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
: : changepasswordurl)) { ?>
: : changepasswordurl)) { ?>
: : radiustype, ''); if (isset($err['radiustype'])) { @@ -77,12 +77,12 @@ if (!isset($config->changepasswordurl)) { ?>
: : changepasswordurl)) { ?>
: : config->user_attribute]) ) { - print_error( 'shib_not_all_attributes_error', 'auth' , '', "'".$this->config->user_attribute."' ('".$_SERVER[$this->config->user_attribute]."'), '".$this->config->field_map_firstname."' ('".$_SERVER[$this->config->field_map_firstname]."'), '".$this->config->field_map_lastname."' ('".$_SERVER[$this->config->field_map_lastname]."') and '".$this->config->field_map_email."' ('".$_SERVER[$this->config->field_map_email]."')"); + print_error( 'shib_not_all_attributes_error', 'auth_shibboleth' , '', "'".$this->config->user_attribute."' ('".$_SERVER[$this->config->user_attribute]."'), '".$this->config->field_map_firstname."' ('".$_SERVER[$this->config->field_map_firstname]."'), '".$this->config->field_map_lastname."' ('".$_SERVER[$this->config->field_map_lastname]."') and '".$this->config->field_map_email."' ('".$_SERVER[$this->config->field_map_email]."')"); } $attrmap = $this->get_attributes(); diff --git a/auth/shibboleth/config.html b/auth/shibboleth/config.html index 5bad214533..43cc733f29 100755 --- a/auth/shibboleth/config.html +++ b/auth/shibboleth/config.html @@ -4,7 +4,7 @@ // Set to defaults if undefined if (!isset($config->auth_instructions) or empty($config->user_attribute)) { - $config->auth_instructions = get_string('auth_shib_instructions', 'auth', $CFG->wwwroot.'/auth/shibboleth/index.php'); + $config->auth_instructions = get_string('auth_shib_instructions', 'auth_shibboleth', $CFG->wwwroot.'/auth/shibboleth/index.php'); } if (!isset ($config->user_attribute)) { $config->user_attribute = ''; @@ -24,28 +24,28 @@
:: convert_data and $config->convert_data != '' and !is_readable($config->convert_data)) { echo '
'; - print_string("auth_shib_convert_data_warning", "auth"); + print_string("auth_shib_convert_data_warning", "auth_shibboleth"); echo ''; } ?>
alt_login ?>alt_login ?>
:: alt_login) and $config->alt_login == 'on' ){ @@ -53,11 +53,11 @@ } ?> />
::