# Changing Username Stops Email Notifications

**URL:** https://meta.discourse.org/t/changing-username-stops-email-notifications/69799
**Category:** Support
**Created:** [September 11, 2017, 9:49am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799 "2017-09-11T09:49:09Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 11, 2017, 9:49am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/1 "2017-09-11T09:49:09Z")

</div>

Hi All,

I’ve managed to reproduce this several times on two Discourse installs.

- Create **User** , assign to `group`
- Create category, llock `category` to `group`
- **User** is `Watching` that `category`
- Change that **User’s** `username`

Post in that `category` as admin or reply to post by `user` and the system doesn’t even bother generating emails notifying that person of posts.

It doesn’t appear in the skipped logs or in ‘sent’.

Can anyone else see this happening?

Thanks!

EDIT: this is actually caused by a bug that has been repaired and spoken about more accurately here:

> [@User profile watch/track/mute options not persisted](https://meta.discourse.org/t/user-profile-watch-track-mute-options-not-persisted/71006):
>
> I believe it is the latest beta that has this problem. AFAIK all user profile options can be saved and persisted, EXCEPT for: Watched Categories Tracked Categories Watching First Post Categories Muted Categories Watched Tags Tracked Tags Watching First Post Tags Muted Tags Muted Users work fine. Pressing Save Changes will send the correct REST PUT command. Came back with 200 and “Saved!” right next to the button. Thus, to the web app, the settings have been changed…

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 11, 2017, 10:37am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/2 "2017-09-11T10:37:11Z")

</div>

How often are you changing people’s usernames? There’s a reason we lock this 2 days after signup for users.

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 11, 2017, 10:40am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/3 "2017-09-11T10:40:35Z")

</div>

The one in question that isn’t a test one I changed after about 2 hours.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 11, 2017, 10:41am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/4 "2017-09-11T10:41:03Z")

</div>

I mean how often do users need to change their username, in general. Every day? Every week? Every user every day? Every user every week?

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 11, 2017, 10:41am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/5 "2017-09-11T10:41:34Z")

</div>

Basically never - I did it because they made a typo when signing up.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 11, 2017, 10:53am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/6 "2017-09-11T10:53:11Z")

</div>

Does it fix it if, after the rename, the user unwatches and re-watches the category? Just as a workaround.

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 11, 2017, 11:03am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/7 "2017-09-11T11:03:30Z")

</div>

Giving that a shot now - have tried just about everything else (adding/removing from Group etc).

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 11, 2017, 11:12am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/8 "2017-09-11T11:12:09Z")

</div>

Unfortunately that hasn’t worked … the period for editing prior to sending has expired and it hasn’t tried to send it 😕

Anything else worth refreshing?

EDIT: have removed and re-added to group as well and impersonating the user gets the notifications, but no emails are being generated.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 11, 2017, 9:29pm UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/9 "2017-09-11T21:29:18Z")

</div>

@techapj can you have a look at this?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [September 12, 2017, 2:52am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/10 "2017-09-12T02:52:00Z")

</div>

I am unable to repro this.

For debugging purpose, @JamesNorth can you try enabling “Send me email notifications even when I am active on the site” for that user (via user preferences), and see if the user receives email?

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 12, 2017, 3:12am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/11 "2017-09-12T03:12:29Z")

</div>

Thanks for checking it out @techAPJ.

Yes, this is enabled for all users on my forum. Just double checked - yes, this user has it enabled.

 ![02 pm](https://global.discourse-cdn.com/meta/original/3X/6/e/6e4009aee3d949a6a377852875c97fe6d89f2c07.png)

When I assume their identity I can see that they have access to the right category, they are watching that category and are getting the notifications up the top, but nothing is generating email-wise.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 12, 2017, 9:26am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/12 "2017-09-12T09:26:32Z")

</div>

Are other people getting notifications or is this a global problem? Is Sidekiq working properly to execute background tasks on your Discourse?

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 12, 2017, 9:47am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/13 "2017-09-12T09:47:28Z")

</div>

Yes - everyone else is getting email notifications as per their individual settings (including me as admin in that same category that I am also watching). In the time since I started this thread here there have been a number of normal email notifications be sent to various users.

Sidekiq is working normally - only thing queued up is the next backup in like 8 hours.

The only thing unique to this user is that it’s the only account that has had its username changed by me. It was created by the user from an invite I sent as admin … then I changed it for them as they made a typo.

It’s the only time I’ve ever had email notifications not work according to settings.

Just to confirm as well, that same category is **not** muted by that user (not sure what happens if someone mutes and watches something … but yeah it’s not that.

* * *

I’m actually just going to update to latest and re-check the things we’ve chatted about thus far.

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 12, 2017, 10:17am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/14 "2017-09-12T10:17:19Z")

</div>

Updated to latest - still the same problem.

I wonder … would the fact that the username is now identical to the group name have anything to do with it?

I have plenty of this happening (same username and group name) as I’m locking people down on a per-category basis, but wonder whether **retrofitting** a username into a group with the same name may be related to this issue?

At a bit of a loss, but there will always be an answer!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 12, 2017, 10:25am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/15 "2017-09-12T10:25:41Z")

</div>

> [@JamesNorth](#):
>
> the fact that the username is now identical to the group name

That’s definitely not recommended. Groups and users share a namespace. I don’t even think that’s supposed to be possible.

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 12, 2017, 10:32am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/16 "2017-09-12T10:32:17Z")

</div>

That is interesting then.

At this stage I have **almost** every other user (about 80 users on this one) with the name username and group name and that all works perfectly.

This is the only user that I have **changed** the username for (and it is identical to the group name).

I just tried changing the group to have an \_ in the name … made a post, but still no email.

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 19, 2017, 8:26am UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/17 "2017-09-19T08:26:49Z")

</div>

What I tired here is nuking that account completely and recreating that whole category etc.

It still won’t send that person emails … so it’s not relating to changing the username.

Is it a **new** thing that Groups and Usernames being the same break email notifications?

It certainly hasn’t been a problem until _this month_ and that person is still receiving normal popup notifications .. it’s just emails that aren’t sending (ignoring watching and send emails even if they were here recently).

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 28, 2017, 12:06pm UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/18 "2017-09-28T12:06:08Z")

</div>

### Email notifications not working (OP regarding Username Change not causing this)

I’ve got a second account that’s doing this now as well.

- They were both created about the same time (a few weeks ago) and neither account have `username` and `group` names matching.

- They are watching only the `category` they are locked down to and are receiving popup notifications about the reply, **but it doesn’t list an unread post and doesn’t send an email out**.

- They were both created by **sending them an account creation link** that would automatically join them to a group that would lock them to a `category`.

Nothing is presenting in the error logs area of the web interface. Is there somewhere else I can look to try to debug this?

Has anything changed recently with respect to emails being sent when someone is watching an entire category?

Accounts that were created before about a month ago are all working perfectly as they used to.

* * *

EDIT: just tried sending user a PM and that emailed off perfectly, so it seems to be related to watching a category and these two things not happening:

1. not registering new posts as ‘unread’ and
2. subsequently not sending email notifications.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [September 28, 2017, 2:39pm UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/19 "2017-09-28T14:39:36Z")

</div>

Long shot, but any change you’ve muted the category and/or topics within? There was a bug (since resolved) a week or so ago regarding this…

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [September 28, 2017, 10:31pm UTC](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799/20 "2017-09-28T22:31:31Z")

</div>

No - double checked it but the only thing I’ve done with these new users is watch it …

[Next page](https://meta.discourse.org/t/changing-username-stops-email-notifications/69799.md?page=2)
