开发者

Membership - get user email

I am using ASP.Net MVC2 with the default membership/profile/role providers, I'd like to access the user email in my ForgotPassword Action to email a new password to the user, but so far I've only been able to get the username (User.Identity.Name).

Am I missing开发者_Go百科 something here?


You need to access user information in MembershipUser class using Membership class, f.ex:

...
MembershipUser u = Membership.GetUser(username);
//u.Email - this is user's email
...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜