Currently I’m using to get the email for the current user.
string to;
MembershipUser username;
username = Membership.GetUser();
to = username.Email;
However when I try to pass a variable to get another users info I get an error.
Seems that Membership.Getuser() only works for the current user and not for another user.
Anyone have any suggestions on how to get the email of another user. Not the current user.
There is another method
Membership.GetUser(string username)which gets aMembershipUserby username.There is yet another one
Membership.GetUser(object providerUserKey)which gets a user by whatever you’ve configured/coded to beproviderUserKey.Take your pick.