feat: finished email confirmation, finished Password Reset
!fix: The user auth system now uses the id, not the email Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
parent
828f784fc8
commit
e8e97b2cd9
11 changed files with 89 additions and 20 deletions
|
@ -18,7 +18,13 @@ public static class UsersRepository
|
|||
public static async Task<UserData> getUserByIdAsync(int userId)
|
||||
{
|
||||
await using var db = new AppDBContext();
|
||||
return await db.Users.FirstOrDefaultAsync(user => user.UserID == userId);
|
||||
return await db.Users
|
||||
.Where(user => user.UserID == userId)
|
||||
.Include(user => user.SubmittedReports)
|
||||
.Include(user => user.Posts)
|
||||
.Include(user => user.Comments)
|
||||
.Include(user => user.RecivedReports)
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
public static async Task<UserData> getUserByEmailRawAsync(string email)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue