thebrandonallen / bp-block-users

Allows BuddyPress administrators to block users indefinitely, or for a specified period of time.
GNU General Public License v2.0
7 stars 2 forks source link

Notify User via Email when Blocked/Unblocked #14

Open jdmdigital opened 6 years ago

jdmdigital commented 6 years ago

I love that you’re preventing Buddypress from sending email notifications to blocked users, but I might suggest creating two new Buddypress “scenarios” so admins can use Buddypress’ native email functionality to notify the user that they’ve been blocked and, perhaps, for how long. Another would be for when a user is subsequently unblocked (manually or automatically).

Obviously, these two email scenarios would need to be allowed even while a user is blocked.

Buddypress already allows themes and plugins to add email scenarios (documentation link coming soon) which means all we would have to do is hook into that and provide a callback (i.e. “on block, User Blocked scenario fires” and vice versa).

Might fork your project and give it a go myself. No promises. Submitting this issue purely to document and as a (gentle) suggestion for enhancement.

jdmdigital commented 6 years ago

I was calling them “scenarios.” Buddypress calls them “Situations.” Anywho... Documentation links:

https://codex.buddypress.org/emails/#edit-email https://codex.buddypress.org/emails/custom-emails/ (Better)

No specific tutorial out there I can find.