Entity Framework + MySql + resetPassword
Opened this issue · 0 comments
Mond0 commented
Hi all,
is there a way to reset the password of some users? My app is using EF and MySQL as database. What I did and throwing me an exception is:
`MySqlSimpleMembershipProvider provider = new MySqlSimpleMembershipProvider();
try
{
//MySql.Web.Security.MySqlWebSecurity.CreateUserAndAccount(user.Name, "password");
password = provider.GetUser(user.Name, true).ResetPassword(); //here the exception
}
catch(Exception e)
{
}`
So it seems the GetUser(..) can't retrive the data but the username I'm passing is valid. Infact I have also tried to create a new account (with the line commented) and I got an exception ("The user already exists, etc").
So, is the method I'm calling correct?
Thanks.