User profile editing and password

This commit is contained in:
2016-09-26 11:13:59 -04:00
parent 6789c1b3b5
commit 75b7c02979
54 changed files with 373 additions and 209 deletions
@@ -74,8 +74,7 @@ namespace InventoryTraker.Web.Controllers
if (!string.IsNullOrEmpty(form.Password))
{
var resetToken = await _userManager.GeneratePasswordResetTokenAsync(user.Id);
var resetResult = await _userManager.ResetPasswordAsync(user.Id, resetToken, form.Password);
var resetResult = await _userManager.ChangePasswordAsync(user, form.Password);
if (!resetResult.Succeeded)
return GetErrorListJson(resetResult.Errors.ToArray());
}