Page MenuHomePhabricator

Move "Welcome" mail generation out of PhabricatorUser
ClosedPublic

Authored by epriestley on Jan 17 2019, 5:53 PM.
Tags
None
Referenced Files
F12830121: D19989.id47723.diff
Thu, Mar 28, 11:59 AM
Unknown Object (File)
Tue, Mar 19, 5:45 PM
Unknown Object (File)
Tue, Mar 19, 5:44 PM
Unknown Object (File)
Tue, Mar 19, 5:44 PM
Unknown Object (File)
Tue, Mar 19, 5:44 PM
Unknown Object (File)
Sun, Mar 10, 1:42 PM
Unknown Object (File)
Feb 2 2024, 7:23 PM
Unknown Object (File)
Feb 2 2024, 9:02 AM
Subscribers
None

Details

Summary

Ref PHI1027. Currently, PhabricatorUser has a couple of mail-related methods which shouldn't really be there in the long term. Immediately, I want to make some adjusments to the welcome email.

Move "Welcome" mail generation to a separate class and consolidate all the error handling. (Eventually, "invite" and "verify address" email should move to similar subclasses, too.) Previously, a bunch of errors/conditions got checked in multiple places.

The only functional change is that we no longer allow you to send welcome mail to disabled users.

Test Plan
  • Used "Send Welcome Mail" from profile pages to send mail.
  • Hit "not admin", "disabled user", "bot/mailing list" errors.
  • Used scripts/user/add_user.php to send welcome mail.
  • Used "Create New User" to send welcome mail.
  • Verified mail with bin/mail show-outbound. (Cleaned up a couple of minor display issues here.)

Diff Detail

Repository
rP Phabricator
Branch
welcome1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21575
Build 29405: Run Core Tests
Build 29404: arc lint + arc unit