在asp.net中手动激活用户帐户
我有一个(很难合作的)客户在我们的网站上创建了一个帐户,但是,他无法登录,因为他尚未单击帐户激活链接。出于某种原因,他不想单击它(他认为它是病毒),
无论如何,我想手动将帐户设置为通过数据库激活..我该怎么做? 谢谢!
(我的意思是,哪些字段需要更改为哪些值?)
I have a (difficult to work with) client who has created an account in our website, however, he cannot log in because he hasnt clicked the account activation link yet. for some reason, he doesnt want to click it (he thinks its virus)
anyway, I want to manually set the account to activated via database.. how do I do that?
thanks!
( i mean, which fields needs to be changed to what values?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在您的 MembershipProvider 上调用这两个方法。
call these two methods on your MembershipProvider.
我在 aspnet 会员表中做了一些摆弄,并找到了如何手动激活帐户!
用户 ID 长得离谱,所以我发现从用户表中的用户名中获取它更容易。
I did some fiddeling around the aspnet membership table and found out how to activate the account manually!
the userid is ridiculously long so i found it easier to pick it up from username from users table.
我最近遇到了同样的问题,我发现当您执行
Membership.CreateUser
调用时,您可以通过像这样插入它来自动将用户创建为 true:isApproved< /code> 是一个 bool,可以在调用创建用户时设置为 true。
I had the same problem recently and I found that when you are doing the
Membership.CreateUser
call you can make it that the user is automatically created as true by inserting it like this:The
isApproved
is a bool and can be set as true when you call the create user.不能临时将自己的地址分配给该帐户并重新发送激活网址吗?也许他可以将邮件转发给您,您可以单击链接。认为这比“侵入”会员服务提供商更容易。
另外,称你的客户愚蠢也不是处理客户的好方法;)
Can't you temporary assign your own address to the account and resend the activation url? Maybe he can forward you the mail and you can click the link. Think that is easier than "hacking" your way into the membership provider.
Also calling your client dumb is not a very good way to handle your clients ;)