diff --git a/ProjectLighthouse.Servers.Website/Controllers/Admin/AdminUserController.cs b/ProjectLighthouse.Servers.Website/Controllers/Admin/AdminUserController.cs index 426269448..0aada8fc2 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.EmailAddressVerified) return this.NotFound(); + if (user.EmailAddress == null || user.EmailAddressVerified) return this.NotFound(); List tokens = await this.database.EmailVerificationTokens .Where(t => t.UserId == targetedUser.UserId) diff --git a/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml b/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml index e1b6fe788..33a07af1e 100644 --- a/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml +++ b/ProjectLighthouse.Servers.Website/Pages/UserPage.cshtml @@ -333,11 +333,11 @@ else } - @if (!Model.ProfileUser.EmailAddressVerified) + @if (Model.ProfileUser.EmailAddress != null && !Model.ProfileUser.EmailAddressVerified) { - Force Verify Email + Forcibly Verify Email }