mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-04-19 19:14:51 +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)
|
||||
|
|
|
@ -333,11 +333,11 @@ else
|
|||
</a>
|
||||
}
|
||||
|
||||
@if (!Model.ProfileUser.EmailAddressVerified)
|
||||
@if (Model.ProfileUser.EmailAddress != null && !Model.ProfileUser.EmailAddressVerified)
|
||||
{
|
||||
<a class="ui green button" href="/moderation/user/@Model.ProfileUser.UserId/forceVerifyEmail">
|
||||
<i class="check icon"></i>
|
||||
<span>Force Verify Email</span>
|
||||
<span>Forcibly Verify Email</span>
|
||||
</a>
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue