Callback when user changes username


(Diego Barreiro) #1

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


(Rafael dos Santos Silva) #2

The user webhook should be triggered by a name change.


(Diego Barreiro) #3

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


(Rafael dos Santos Silva) #4

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


(Diego Barreiro) #5

Thanks, I’ll take a look to it :+1:


(Diego Barreiro) #6

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


(Jeff Atwood) #7

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


(Diego Barreiro) #8

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