We do not allow a user to change their username af...
# ory-selfhosting
p
We do not allow a user to change their username after an account is created. Is there anyway to express this in the Kratos identity schema such that the UI will set that input field to
disabled
?
p
Hi @plain-lunch-50969 I don't think there is any option like that, maybe you could have a hook that disallows the request on username change https://www.ory.sh/docs/kratos/self-service/hooks#web-hooks paired with your UI which just doesn't show the field as editable.
p
I ended up just setting
disabled
to true by hand for
traits.username
when I get the initial settings flow. Not the best, but it works.
I will investigate the hook technique as well.