ASP.NET用户名变化 [英] ASP.NET username change
问题描述
我有一个使用ASP.net成员资格提供一个asp.net网站。在DB的每个评论,词条等由用户标识跟踪。
I have an asp.net site which uses the ASP.net Membership provider. Each comment, entry etc in the DB is tracked by the userID.
由于MS不提供一种方法来改变用户名,我发现在DB的用户表的用户名和只有1,其中的用户名出现的地方。
Since MS doesn't provide a way to change the username, I've found the userNAME in the "users" table in the DB and there is only 1 place where the username appears.
我的问题是,
它是安全提供一个编辑个人资料页面,用户可以编辑自己的用户名。当然,我会通过数据库直接更改用户名值处理后台这种变化。
Is it safe to provide an "edit profile" page where the user is allowed to edit their own username. Of course i would handle this change in the background by directly changing the "username" value in the DB.
有什么缺点呢?我已经创建并修改了一些测试帐户,它似乎被罚款,我只是想知道是否有任何已知的负面这种投入生产之前。
Are there any downsides to this ? I've created and modified some test accounts and it seems to be fine, i am just wondering if there is any known negatives to this before putting it into production.
推荐答案
下面是一个好文章上如何做你想做的。
Here's a good article on how to do what you want.
这篇关于ASP.NET用户名变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!