public bool ResetPasswordForCustomer(string email, string newPassword) { bool result = false; CustomerAccount u = Customers.FindByEmail(email); if (u != null) { u.Password = u.EncryptPassword(newPassword); Membership.CreateUserStatus s = CreateUserStatus.None; result = UpdateCustomer(u, ref s); } return(result); }
public bool ChangePasswordForCustomer(string email, string oldPassword, string newPassword) { bool result = false; CustomerAccount u = Customers.FindByEmail(email); if (u != null) { if (DoPasswordsMatchForCustomer(oldPassword, u) == true) { u.Password = u.EncryptPassword(newPassword); Membership.CreateUserStatus s = CreateUserStatus.None; result = UpdateCustomer(u, ref s); } } return(result); }