User ID obfuscation

后端 未结 3 512
醉话见心
醉话见心 2020-12-24 09:31

I expect this\'s been asked before but haven\'t really found an appropriate answer here and also don\'t have the time to come up with my own solution...

<
3条回答
  •  囚心锁ツ
    2020-12-24 10:07

    May I suggest that you use a UUID instead. This could be indexable and generated within a stored procedure when you add a new user to the database. This would mean either adding a new column to the database table or a new table containing UUIDs but with the User ID as related key.

    edit

    If you really want to avoid GUIDs then why not use the users "username" whilst they access their profile page. After all I imagine that you don't assign a user an ID until they have entered valid information and that data has been saved into the database.

提交回复
热议问题