From e89a4c27fad0ec9015173e59fc957197a08c76c5 Mon Sep 17 00:00:00 2001 From: sudokoko Date: Fri, 31 May 2024 18:40:39 -0400 Subject: [PATCH] Fix mismatch between user/targetedUser in force verify endpoint --- .../Controllers/Admin/AdminUserController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectLighthouse.Servers.Website/Controllers/Admin/AdminUserController.cs b/ProjectLighthouse.Servers.Website/Controllers/Admin/AdminUserController.cs index 0aada8fc2..d4fdfaf8b 100644 --- a/ProjectLighthouse.Servers.Website/Controllers/Admin/AdminUserController.cs +++ b/ProjectLighthouse.Servers.Website/Controllers/Admin/AdminUserController.cs @@ -103,7 +103,7 @@ public async Task ForceVerifyEmail([FromRoute] int id) UserEntity? targetedUser = await this.database.Users.FirstOrDefaultAsync(u => u.UserId == id); if (targetedUser == null) return this.NotFound(); - if (user.EmailAddress == null || user.EmailAddressVerified) return this.NotFound(); + if (targetedUser.EmailAddress == null || targetedUser.EmailAddressVerified) return this.NotFound(); List tokens = await this.database.EmailVerificationTokens .Where(t => t.UserId == targetedUser.UserId)