diff options
Diffstat (limited to 'Services')
-rw-r--r-- | Services/IUserAccountService.cs | 1 | ||||
-rw-r--r-- | Services/UserAccountService.cs | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Services/IUserAccountService.cs b/Services/IUserAccountService.cs index 900e562..56c665c 100644 --- a/Services/IUserAccountService.cs +++ b/Services/IUserAccountService.cs @@ -4,5 +4,6 @@ using BackendPIA.Models; namespace BackendPIA.Services { public interface IUserAccountService { public Task<IdentityResult> CreateUserAccount(UserAccount user, string password, string role); + public Task<UserAccount> GetUserAccount(string email); } }
\ No newline at end of file diff --git a/Services/UserAccountService.cs b/Services/UserAccountService.cs index e81ea76..eccaff3 100644 --- a/Services/UserAccountService.cs +++ b/Services/UserAccountService.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Identity; using BackendPIA.Models; +using BackendPIA.Forms; namespace BackendPIA.Services { public class UserAccountService : IUserAccountService { @@ -17,5 +18,11 @@ namespace BackendPIA.Services { return result; } + + public async Task<UserAccount> GetUserAccount(string email) { + var result = await _manager.FindByEmailAsync(email); + + return result; + } } }
\ No newline at end of file |