Reputation: 23
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 something here?
Upvotes: 1
Views: 3984
Reputation:
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
...
Upvotes: 4