mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-28 07:58:40 +00:00
Disallow forced email verification of users with no email
This commit is contained in:
parent
643cb8e816
commit
3546f60f4f
2 changed files with 3 additions and 3 deletions
|
@ -103,7 +103,7 @@ public class AdminUserController : ControllerBase
|
|||
|
||||
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<EmailVerificationTokenEntity> tokens = await this.database.EmailVerificationTokens
|
||||
.Where(t => t.UserId == targetedUser.UserId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue