mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-49280 auth: Rewording duplicate emails setting
From allowuserstoshareemailaddresses to allowaccountssameemail, also changing lang strings.
This commit is contained in:
parent
85fa6a9305
commit
9502083292
@ -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'),
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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.';
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user