Title: Signup e-mail hook
Last modified: August 22, 2016

---

# Signup e-mail hook

 *  [gld](https://wordpress.org/support/users/gld/)
 * (@gld)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/signup-e-mail-hook/)
 * Hi Roland, we have two ways of a new user being added to the database. Either:
 * a) a user applies
    b) an admin enters the new user
 * For situation a), I want the email notifications to fire (working fine) but I
   don’t want to fire email notifications for situation b) which of course they 
   currently do.
 * I’m already utilizing the pdb-before_submit_signup filter to then make changes
   to the WP user Database. Is there a way to intercept the email action to prevent
   the mails being sent for situation b) ?
 * Reg
    Greg
 * [https://wordpress.org/plugins/participants-database/](https://wordpress.org/plugins/participants-database/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/signup-e-mail-hook/#post-5763030)
 * Emails are not normally sent for new users added in the admin, so I’m wondering
   what’s going on. Are you sure that adding a new record in the admin generates
   an email?
 * I have no filter in the plugin available to use to control email going out, but
   you can use the WordPress filter ‘wp_mail’ to control your outgoing emails.
 *  Thread Starter [gld](https://wordpress.org/support/users/gld/)
 * (@gld)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/signup-e-mail-hook/#post-5763047)
 * Sorry Roland, I should have been more specific. The ‘admins’ are users with extra
   rights but are not using the Admin form. I have another page which uses a customized
   signup form to add these users. From the plugin perspective, I’m assuming these
   events are being seen exactly the same for both situations?
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/signup-e-mail-hook/#post-5763083)
 * OK, well make sure that signup form is properly configured: the emails are sent
   when the confirmation page is shown, are your admins seeing a confirmation message
   after adding a new record?
 *  Thread Starter [gld](https://wordpress.org/support/users/gld/)
 * (@gld)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/signup-e-mail-hook/#post-5763085)
 * Yes it does that as well. I guess I need to intercept it before it goes to the
   confirmation form? I do need a different confirmation message for the admins.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/signup-e-mail-hook/#post-5763086)
 * You can set the page the user will be sent to in the signup shortcode using the“
   action” attribute. That page will need to have the [pdb_signup_thanks] shortcode
   in order for the submission to be completed. If you want to customize that message(
   the plugin only has one confirmation message setting) you need to use a custom
   template for the signup thanks shortcode.
 * The only way to intercept the outgoing email is to use the ‘wp_mail’ filter provided
   by WordPress. In your filter callback. you would inspect the outgoing message(
   or just check which page the user is on) and abort it if it is coming from your“
   admin” form submission.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Signup e-mail hook’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/signup-e-mail-hook/#post-5763086)
 * Status: not resolved