Why should usernames be unchangable?

后端 未结 8 1917
借酒劲吻你
借酒劲吻你 2021-02-05 06:28

I read everywhere (and see in practice) that usernames should not be changeable. When I ask why, \'security\' is given as a reason.

I\'ve been searching for a definitive

8条回答
  •  别那么骄傲
    2021-02-05 06:44

    If you don't allow people to change their usernames then some people are just going to create new accounts. I don't see any security risk in this, and many apps including SO allow you to change your name. If you change the name, keep the userid (primary key) the same so all of the data links up properly.

    The only danger I see is if you can change your name to an account that already exists like 'admin'.

提交回复
热议问题