Page MenuHomePhabricator

Move "Welcome" mail generation out of PhabricatorUser
ClosedPublic

Authored by epriestley on Jan 17 2019, 5:53 PM.
Tags
None
Referenced Files
F18624622: D19989.id47723.diff
Mon, Sep 15, 8:37 PM
F18569245: D19989.id47748.diff
Wed, Sep 10, 1:08 AM
F18569244: D19989.id47723.diff
Wed, Sep 10, 1:08 AM
F18566842: D19989.id.diff
Tue, Sep 9, 2:56 PM
F18517818: D19989.diff
Fri, Sep 5, 1:55 PM
F18336705: D19989.diff
Mon, Aug 25, 4:55 PM
F18175959: D19989.id47748.diff
Aug 15 2025, 10:40 PM
F18129934: D19989.id.diff
Aug 13 2025, 6:33 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable