The actual functonality will come in a later commit.
Bug: T231495
Change-Id: I9977b0d51a2b89b79c199bc4423f123e581e2a2f
'wllimit' => 250,
'useeditwarning' => 1,
'prefershttps' => 1,
+ 'requireemail' => 0,
];
/**
],
];
+/**
+ * Temporary feature flag that controls whether users will see a checkbox allowing them to
+ * require providing email during password resets.
+ *
+ * @deprecated This feature is under development, don't assume this flag's existence or function
+ * outside of MediaWiki.
+ */
+$wgAllowRequiringEmailForResets = false;
+
/** @} */ # end user accounts }
/************************************************************************//**
* @since 1.34
*/
public static $constructorOptions = [
+ 'AllowRequiringEmailForResets',
'AllowUserCss',
'AllowUserCssPrefs',
'AllowUserJs',
}
}
+ if ( $this->options->get( 'AllowRequiringEmailForResets' ) ) {
+ $defaultPreferences['requireemail'] = [
+ 'type' => 'toggle',
+ 'label-message' => 'tog-requireemail',
+ 'help-message' => 'prefs-help-requireemail',
+ 'section' => 'personal/email',
+ 'disabled' => $disableEmailPrefs,
+ ];
+ }
+
if ( $this->options->get( 'EnableUserEmail' ) && $user->isAllowed( 'sendemail' ) ) {
$defaultPreferences['disablemail'] = [
'id' => 'wpAllowEmail',
"tog-useeditwarning": "Warn me when I leave an edit page with unsaved changes",
"tog-prefershttps": "Always use a secure connection while logged in",
"tog-showrollbackconfirmation": "Show a confirmation prompt when clicking on a rollback link",
+ "tog-requireemail": "Require email for password resets",
"underline-always": "Always",
"underline-never": "Never",
"underline-default": "Skin or browser default",
"prefs-help-email": "Email address is optional, but is needed for password resets, should you forget your password.",
"prefs-help-email-others": "You can also choose to let others contact you by email through a link on your user or talk page.\nYour email address is not revealed when other users contact you.",
"prefs-help-email-required": "Email address is required.",
+ "prefs-help-requireemail": "If checked, will only send password reset emails if the resetting person has provided both username and email for this account.",
"prefs-info": "Basic information",
"prefs-i18n": "Internationalisation",
"prefs-signature": "Signature",
"tog-useeditwarning": "Used as label for the checkbox in [[Special:Preferences#mw-prefsection-editing|Special:Preferences]].",
"tog-prefershttps": "Toggle option used in [[Special:Preferences]] that indicates if the user wants to use a secure connection when logged in",
"tog-showrollbackconfirmation": "Toggle option used in [[Special:Preferences]] to enable/disable rollback confirmation prompt. Should be visible only to users with rollback rights.",
+ "tog-requireemail": "Toggle option used in [[Special:Preferences]]. Should be only visible to users who have confirmed their email address.\n\nSee also: {{msg-mw|prefs-help-requireemail}}",
"underline-always": "Used in [[Special:Preferences#mw-prefsection-rendering|Preferences]].\n\nThis option means \"always underline links\", there are also options {{msg-mw|Underline-never}} and {{msg-mw|Underline-default}}.\n\n{{Gender}}\n{{Identical|Always}}",
"underline-never": "Used in [[Special:Preferences#mw-prefsection-rendering|Preferences]].\n\nThis option means \"never underline links\", there are also options {{msg-mw|Underline-always}} and {{msg-mw|Underline-default}}.\n\n{{Gender}}\n{{Identical|Never}}",
"underline-default": "Used in [[Special:Preferences#mw-prefsection-rendering|Preferences]].\n\nThis option means \"underline links as in your user skin or your browser\", there are also options {{msg-mw|Underline-never}} and {{msg-mw|Underline-always}}.\n\n{{Gender}}\n{{Identical|Browser default}}",
"prefs-help-email": "Shown as explanation text on [[Special:Preferences]] > {{int:prefs-personal}} > {{int:email}}.\n\nSee also:\n* {{msg-mw|prefs-help-email-required|help}}\n* {{msg-mw|prefs-help-email-others|help}}\n* {{msg-mw|prefs-changeemail|link title}}\n* {{msg-mw|prefs-setemail|link title}}",
"prefs-help-email-others": "This text is shown on account creation, below the description of the e-mail address field (which is optional).\n\nSee also:\n* {{msg-mw|prefs-help-email-required|help}}\n* {{msg-mw|prefs-help-email|help}}\n* {{msg-mw|prefs-changeemail|link title}}\n* {{msg-mw|prefs-setemail|link title}}",
"prefs-help-email-required": "Shown as explanation text on [[Special:Preferences]] > {{int:prefs-personal}} > {{int:email}}.\n\nSee also:\n* {{msg-mw|prefs-help-email|help}}\n* {{msg-mw|prefs-help-email-others|help}}\n* {{msg-mw|prefs-changeemail|link title}}\n* {{msg-mw|prefs-setemail|link title}}",
+ "prefs-help-requireemail": "Shown as explanation text on [[Special:Preferences]] > {{int:prefs-personal}} > {{int:email}}.\n\nSee also: {{msg-mw|tog-requireemail}}",
"prefs-info": "Header for the box giving basic information on the user account, displayed on the 'user profile' tab of the [[Special:Preferences|user preferences]] special page.\n{{Identical|Basic information}}",
"prefs-i18n": "Field set legend for user preferences regarding the interface language",
"prefs-signature": "{{Identical|Signature}}",