Page MenuHomePhabricator

ENotif should verify isEmailConfirmed when sending notifications to UsersNotifiedOnAllChanges
Closed, ResolvedPublic

Description

The ENotif has a logic that it verified if the email is confirmed:

However when refactoring the UsersNotifiedOnAllChanges part we found out that this code doesn't check verify isEmailConfirmed() when sending emails to people listed in UsersNotifiedOnAllChanges.

To be consistent with other two notifications, and as a good practice - RecentChangeNotificationsHandler should send notifications only to users who have confirmed emails.

Event Timeline

Change #1131408 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Make $wgUsersNotifiedOnAllChanges require confirmed emails

https://gerrit.wikimedia.org/r/1131408

Test plan:

  1. Add user A to $wgUsersNotifiedOnAllChanges
  2. As user A, set an email address without confirming it
  3. As user B, edit a page that user A is not watching (and not their user talk page)
  4. As user A, verify that you did not receive the email (Extension:Inbox is convenient for local testing without really sending emails)
  5. As user A, confirm your email address (or use resetUserEmail.php --no-reset-password to do it without really sending confirmation emails)
  6. As user B, edit a page that user A is not watching again
  7. As user A, verify that you received the email this time

Change #1131408 merged by jenkins-bot:

[mediawiki/core@master] Make $wgUsersNotifiedOnAllChanges require confirmed emails

https://gerrit.wikimedia.org/r/1131408