MDL-49280 auth: Rewording duplicate emails setting
authorDavid Monllao <davidm@moodle.com>
Thu, 20 Aug 2015 04:56:11 +0000 (12:56 +0800)
committerDavid Monllao <davidm@moodle.com>
Thu, 20 Aug 2015 04:56:11 +0000 (12:56 +0800)
From allowuserstoshareemailaddresses to allowaccountssameemail, also
changing lang strings.

admin/settings/plugins.php
admin/tool/uploaduser/index.php
admin/tool/uploaduser/user_form.php
lang/en/auth.php
user/edit_form.php
user/editadvanced_form.php

index 9414744..820d25b 100644 (file)
@@ -80,9 +80,9 @@ if ($hassiteconfig) {
     $temp->add(new admin_setting_heading('manageauthscommonheading', new lang_string('commonsettings', 'admin'), ''));
     $temp->add(new admin_setting_special_registerauth());
     $temp->add(new admin_setting_configcheckbox('authloginviaemail', new lang_string('authloginviaemail', 'core_auth'), new lang_string('authloginviaemail_desc', 'core_auth'), 0));
-    $temp->add(new admin_setting_configcheckbox('allowuserstoshareemailaddresses',
-                    new lang_string('allowuserstoshareemailaddresses', 'core_auth'),
-                    new lang_string('allowuserstoshareemailaddresses_desc', 'core_auth'), 0));
+    $temp->add(new admin_setting_configcheckbox('allowaccountssameemail',
+                    new lang_string('allowaccountssameemail', 'core_auth'),
+                    new lang_string('allowaccountssameemail_desc', 'core_auth'), 0));
     $temp->add(new admin_setting_configcheckbox('authpreventaccountcreation', new lang_string('authpreventaccountcreation', 'admin'), new lang_string('authpreventaccountcreation_help', 'admin'), 0));
     $temp->add(new admin_setting_configcheckbox('loginpageautofocus', new lang_string('loginpageautofocus', 'admin'), new lang_string('loginpageautofocus_help', 'admin'), 0));
     $temp->add(new admin_setting_configselect('guestloginbutton', new lang_string('guestloginbutton', 'auth'),
index 70ca155..ad36657 100644 (file)
@@ -168,7 +168,7 @@ if ($formdata = $mform2->is_cancelled()) {
     $allowdeletes      = (!empty($formdata->uuallowdeletes) and $optype != UU_USER_ADDNEW and $optype != UU_USER_ADDINC);
     $allowsuspends     = (!empty($formdata->uuallowsuspends));
     $bulk              = $formdata->uubulk;
-    $noemailduplicates = empty($CFG->allowuserstoshareemailaddresses) ? 1 : $formdata->uunoemailduplicates;
+    $noemailduplicates = empty($CFG->allowaccountssameemail) ? 1 : $formdata->uunoemailduplicates;
     $standardusernames = $formdata->uustandardusernames;
     $resetpasswords    = isset($formdata->uuforcepasswordchange) ? $formdata->uuforcepasswordchange : UU_PWRESET_NONE;
 
index 9a2a33b..04bb24b 100644 (file)
@@ -138,7 +138,7 @@ class admin_uploaduser_form2 extends moodleform {
         $mform->disabledIf('uuallowsuspends', 'uutype', 'eq', UU_USER_ADDNEW);
         $mform->disabledIf('uuallowsuspends', 'uutype', 'eq', UU_USER_ADDINC);
 
-        if (!empty($CFG->allowuserstoshareemailaddresses)) {
+        if (!empty($CFG->allowaccountssameemail)) {
             $mform->addElement('selectyesno', 'uunoemailduplicates', get_string('uunoemailduplicates', 'tool_uploaduser'));
             $mform->setDefault('uunoemailduplicates', 1);
         } else {
index 85e47c0..6822e34 100644 (file)
@@ -114,8 +114,8 @@ $string['limitconcurrentlogins_desc'] = 'If enabled the number of concurrent bro
 $string['locked'] = 'Locked';
 $string['authloginviaemail'] = 'Allow log in via email';
 $string['authloginviaemail_desc'] = 'Allow users to use both username and email address (if unique) for site login.';
-$string['allowuserstoshareemailaddresses'] = 'Allow users to share email addresses';
-$string['allowuserstoshareemailaddresses_desc'] = 'Allow different user accounts to share the same email address. It is important to ensure that this will not cause any unexpected security issues in your setup before enabling it. For example, password change confirmations will be sent to the shared email address.';
+$string['allowaccountssameemail'] = 'Allow accounts with same email';
+$string['allowaccountssameemail_desc'] = 'If enabled, more than one user account can share the same email address. This may result in security or privacy issues, for example with the password change confirmation email.';
 $string['md5'] = 'MD5 hash';
 $string['nopasswordchange'] = 'Password can not be changed';
 $string['nopasswordchangeforced'] = 'You cannot proceed without changing your password, however there is no available page for changing it. Please contact your Moodle Administrator.';
index fd99788..0c0e2a6 100644 (file)
@@ -175,7 +175,7 @@ class user_edit_form extends moodleform {
         } else if (!validate_email($usernew->email)) {
             $errors['email'] = get_string('invalidemail');
         } else if (($usernew->email !== $user->email)
-                and empty($CFG->allowuserstoshareemailaddresses)
+                and empty($CFG->allowaccountssameemail)
                 and $DB->record_exists('user', array('email' => $usernew->email, 'mnethostid' => $CFG->mnet_localhost_id))) {
             $errors['email'] = get_string('emailexists');
         }
index b58b907..ef6642a 100644 (file)
@@ -262,7 +262,7 @@ class user_editadvanced_form extends moodleform {
         if (!$user or $user->email !== $usernew->email) {
             if (!validate_email($usernew->email)) {
                 $err['email'] = get_string('invalidemail');
-            } else if (empty($CFG->allowuserstoshareemailaddresses)
+            } else if (empty($CFG->allowaccountssameemail)
                     and $DB->record_exists('user', array('email' => $usernew->email, 'mnethostid' => $CFG->mnet_localhost_id))) {
                 $err['email'] = get_string('emailexists');
             }