# Bug: new user notification email cannot be disabled

**URL:** https://meta.discourse.org/t/bug-new-user-notification-email-cannot-be-disabled/307922
**Category:** WordPress
**Created:** [May 14, 2024, 4:00pm UTC](https://meta.discourse.org/t/bug-new-user-notification-email-cannot-be-disabled/307922 "2024-05-14T16:00:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![TimJensen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/timjensen/32/543315_2.png) [@TimJensen](https://meta.discourse.org/u/TimJensen)
#### Post date: [May 14, 2024, 4:00pm UTC](https://meta.discourse.org/t/bug-new-user-notification-email-cannot-be-disabled/307922/1 "2024-05-14T16:00:51Z")

</div>

There is a bug where the new user notification email sends even when the setting is disabled via the ‘wp\_send\_new\_user\_notification\_to\_user’ filter.

> <https://github.com/discourse/wp-discourse/blob/7f16f3fa5e97fe2478c07104b1ea6d9678722627/lib/wp-new-user-notification.php#L114-L117>

To fix the bug the `$send_notification_to_user` variable needs to be included in the condition on line 117.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [May 15, 2024, 7:57am UTC](https://meta.discourse.org/t/bug-new-user-notification-email-cannot-be-disabled/307922/2 "2024-05-15T07:57:47Z")

</div>

Thanks Tim, looks like that is indeed a bug. I’ll add a fix for it in the next version.
