Browse files

MDL-29093 - Authentication improved new setting name and strings

  • Loading branch information...
1 parent 4f6aa35 commit 2c7a91475f157c0d6f6bde0691217dbc140c4d88 Sam Hemelryk committed Sep 13, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 admin/settings/plugins.php
  2. +2 −2 lang/en/admin.php
  3. +1 −1 lib/moodlelib.php
@@ -74,7 +74,7 @@
$temp->add(new admin_setting_manageauths());
$temp->add(new admin_setting_heading('manageauthscommonheading', get_string('commonsettings', 'admin'), ''));
$temp->add(new admin_setting_special_registerauth());
- $temp->add(new admin_setting_configcheckbox('authonly', get_string('authonly', 'admin'), get_string('authonly_help', 'admin'), 0));
+ $temp->add(new admin_setting_configcheckbox('authpreventaccountcreation', get_string('authpreventaccountcreation', 'admin'), get_string('authpreventaccountcreation_help', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('loginpageautofocus', get_string('loginpageautofocus', 'admin'), get_string('loginpageautofocus_help', 'admin'), 0));
$temp->add(new admin_setting_configselect('guestloginbutton', get_string('guestloginbutton', 'auth'),
get_string('showguestlogin', 'auth'), '1', array('0'=>get_string('hide'), '1'=>get_string('show'))));
@@ -59,8 +59,8 @@
$string['appearance'] = 'Appearance';
$string['aspellpath'] = 'Path to aspell';
$string['authentication'] = 'Authentication';
-$string['authonly'] = 'Authentication for authentication only';
-$string['authonly_help'] = 'Enabling this option makes authentication plugins only authenticate already existing users. No new users will be created as part of the login process, even if entered username and password are valid. This also means you need to create new users using other mechanisms (manual creation, user uploading, LDAP sync, etc.)';
+$string['authpreventaccountcreation'] = 'Prevent account creation when authenticating';
+$string['authpreventaccountcreation_help'] = 'When a user authenticates, if they do not yet have an account on the site, usually one will be automatically created for them. It may be that you wish to authenticate using an external system, but you wish to restrict access to the site to users with an existing account only. With this option enabled, only existing users will be able to gain access after they are authenticated via the external system. New accounts will need to be created manually or via the upload users feature.';
$string['authsettings'] = 'Manage authentication';
$string['autolang'] = 'Language autodetect';
$string['autologinguests'] = 'Auto-login guests';
@@ -3770,7 +3770,7 @@ function authenticate_user_login($username, $password) {
} else {
// if user not found and user creation is not disabled, create it
- if (empty($CFG->authonly)) {
+ if (empty($CFG->authpreventaccountcreation)) {
$user = create_user_record($username, $password, $auth);
} else {

0 comments on commit 2c7a914

Please sign in to comment.