User profile editing and password
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using InventoryTraker.Web.Core;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.Owin;
|
||||
@@ -26,5 +27,11 @@ namespace InventoryTraker.Web.Identity
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IdentityResult> ChangePasswordAsync(User user, string newPassword)
|
||||
{
|
||||
var resetToken = await GeneratePasswordResetTokenAsync(user.Id);
|
||||
return await ResetPasswordAsync(user.Id, resetToken, newPassword);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user