mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-19 03:31:29 +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);
|
UserEntity? targetedUser = await this.database.Users.FirstOrDefaultAsync(u => u.UserId == id);
|
||||||
if (targetedUser == null) return this.NotFound();
|
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
|
List<EmailVerificationTokenEntity> tokens = await this.database.EmailVerificationTokens
|
||||||
.Where(t => t.UserId == targetedUser.UserId)
|
.Where(t => t.UserId == targetedUser.UserId)
|
||||||
|
|
|
@ -333,11 +333,11 @@ else
|
||||||
</a>
|
</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">
|
<a class="ui green button" href="/moderation/user/@Model.ProfileUser.UserId/forceVerifyEmail">
|
||||||
<i class="check icon"></i>
|
<i class="check icon"></i>
|
||||||
<span>Force Verify Email</span>
|
<span>Forcibly Verify Email</span>
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue