diff options
Diffstat (limited to 'ExamTemplate/Services/UserService.cs')
| -rw-r--r-- | ExamTemplate/Services/UserService.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ExamTemplate/Services/UserService.cs b/ExamTemplate/Services/UserService.cs index 2f137a1..8e5c682 100644 --- a/ExamTemplate/Services/UserService.cs +++ b/ExamTemplate/Services/UserService.cs @@ -77,6 +77,14 @@ namespace ExamTemplate.Services return result.Succeeded;
}
+ public async Task<bool> DeleteUserAsync(ClaimsPrincipal claimsPrincipal)
+ {
+ User user = await this._userManager.GetUserAsync(claimsPrincipal);
+
+ IdentityResult result = await this._userManager.DeleteAsync(user);
+ return result.Succeeded;
+ }
+
public bool IsSignedIn(ClaimsPrincipal claimsPrincipal)
{
return this._signInManager.IsSignedIn(claimsPrincipal);
|
