# Callback when user changes username

**URL:** https://meta.discourse.org/t/callback-when-user-changes-username/105260
**Category:** Bug
**Created:** [December 29, 2018, 1:05pm UTC](https://meta.discourse.org/t/callback-when-user-changes-username/105260 "2018-12-29T13:05:29Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [December 29, 2018, 1:05pm UTC](https://meta.discourse.org/t/callback-when-user-changes-username/105260/1 "2018-12-29T13:05:29Z")

</div>

Is there a way to get a callback or to trigger a request to an external URL when an user changes its username?  
I would need to update it in our database which is linked to Discourse

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 29, 2018, 3:45pm UTC](https://meta.discourse.org/t/callback-when-user-changes-username/105260/2 "2018-12-29T15:45:07Z")

</div>

The user webhook should be triggered by a name change.

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [December 29, 2018, 3:53pm UTC](https://meta.discourse.org/t/callback-when-user-changes-username/105260/3 "2018-12-29T15:53:22Z")

</div>

But what I need is to be triggered by a **username** change, not by a name change

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 29, 2018, 3:53pm UTC](https://meta.discourse.org/t/callback-when-user-changes-username/105260/4 "2018-12-29T15:53:59Z")

</div>

Same thing, the webhook should be triggered by any user details edit.

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [December 29, 2018, 3:58pm UTC](https://meta.discourse.org/t/callback-when-user-changes-username/105260/5 "2018-12-29T15:58:45Z")

</div>

Thanks, I’ll take a look to it 👍

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [December 29, 2018, 4:09pm UTC](https://meta.discourse.org/t/callback-when-user-changes-username/105260/6 "2018-12-29T16:09:08Z")

</div>

> [@Falco](#):
>
> Same thing, the webhook should be triggered by any user details edit.

I just tested and it’s not  
I changed my username and the webhook didn’t trigger, whilst when changing name it does

---

<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: [December 29, 2018, 6:50pm UTC](https://meta.discourse.org/t/callback-when-user-changes-username/105260/7 "2018-12-29T18:50:00Z")

</div>

By default, users _can’t_ change their username, beyond a grace period for a few days after initial account creation.

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [January 1, 2019, 6:41pm UTC](https://meta.discourse.org/t/callback-when-user-changes-username/105260/8 "2019-01-01T18:41:28Z")

</div>

But if a community decides to allow name changes forever, then the webhook should handle that change, no?
