XF 2.0 Adding new user options for email receipts

DragonByte Tech

Well-known member
I'm looking at adding a couple options to let users control what emails they receive from a new product I'm creating.

First question; does the "Receive site mailings" act as a master switch for all emails? In other words if that option is off, is the "Receive email when a new conversation message is received" option ignored even if it's enabled?

Secondly; I'm looking at the process for adding a new user option and I want to make sure I'm not missing any points:
  • Template modification: admin:option_template_registrationDefaults
  • Template modification: admin:user_edit
  • Template modification: public:account_preferences
  • Class extension: XF\Admin\Controller\User to extend protected function userSaveProcess(\XF\Entity\User $user) (setting up another entity input call)
  • Class extension: XF\ChangeLog\User to extend protected function getLabelMap() and protected function getFormatterMap()
  • Class extension: XF\Entity\UserOption to extend protected function _setupDefaults()
  • Class extension: XF\Pub\Controller\Account to extend protected function preferencesSaveProcess(\XF\Entity\User $visitor) (setting up another entity input call)
  • Class extension: XF\Service\User\EmailStop to extend public function stopAll()
  • Code event listener: entity_structure (hint: XF\Entity\User) to add the column to the structure
That appears to be all the mentions of receive_admin_email I found when searching through the code, is there anything I've missed? I've not actually gotten started on this yet, since I'm not at the front-end stage of this project yet, just thought I'd ask ahead of time :)

Thanks!


Fillip
 
Top Bottom