0
ofir1234 created
Hi. Is there an easy way to change the admin password via code ? I tried resolving the UserManager and then changing the password for user no 1, like this :
await _userManager.ChangePasswordAsync(1, "123qwe","blabla");
But the password is still the same. So how can I do it ?
Thanks.
3 Answer(s)
-
0
Hi,
This is the right way actually. Can you get the return value of this method and see if there is an error message ?
var result = await _userManager.ChangePasswordAsync(1, "123qwe", "blabla");
-
0
Any other way to change the admin password ? I just need to change it.
-
0
Hi,
Can you get the result of ChangePasswordAsync method and see if there is an error ?
var result = await _userManager.ChangePasswordAsync(1, "123qwe","blabla");