As a target of harassment, I want to restrict which user groups can send me email (e.g. choose between all users, require autoconfirmed access or admins). If sending email is disallowed this way, the "email this user" link should not be displayed and visiting Special:EmailUser/Foobar should display the "This user has chosen not to receive email from other users." message.
Meta — Community health initiative/Allow users to restrict which user groups can send them emails
- In the 'Email options' of the 'User profile' tab of Special:Preferences, add a new tickbox preference
- Label: Allow emails from brand-new users (learn more)
- 'learn more' should link to a help/project page (TBD)
- If the user has this preference enabled (ticked) the Special:EmailUser feature should work exactly as it does today.
- If the user has this preference disabled (unticked):
- Users in the autoconfirmed group should be able to use the Special:EmailUser feature as it exactly does today.
- Users not in the autoconfirmed group:
- should not see the "Email this user" link in the left rail on userspace pages
- should see the standard error message of "This user has chosen not to receive email from other users" as if the other user had the entire preference disabled when they directly navigate to Special:EmailUser/Foobar
- The default for new accounts created when their email address is confirmed should be ticked (on)