HomePhabricator

Move "Welcome" mail generation out of PhabricatorUser

Description

Move "Welcome" mail generation out of PhabricatorUser

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.)

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D19989

Details

Provenance
epriestleyAuthored on Jan 17 2019, 5:39 PM
epriestleyPushed on Jan 19 2019, 3:50 AM
Reviewer
amckinley
Differential Revision
D19989: Move "Welcome" mail generation out of PhabricatorUser
Parents
rP98bf3a950dcf: Add setup warnings for "local_infile" (MySQL Server) and "mysql[i].
Branches
Unknown
Tags
Unknown
Build Status
Buildable 21600
Build 29448: Run Core Tests