mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-14 22:02:26 +00:00
Dont show banned users on UsersPage
This commit is contained in:
parent
1ba31fb8ed
commit
57ba3f76ff
2 changed files with 4 additions and 3 deletions
|
@ -34,8 +34,9 @@ public class UsersPage : BaseLayout
|
|||
|
||||
if (this.PageNumber < 0 || this.PageNumber >= this.PageAmount) return this.Redirect($"/users/{Math.Clamp(this.PageNumber, 0, this.PageAmount - 1)}");
|
||||
|
||||
this.Users = await this.Database.Users.OrderByDescending
|
||||
(p => p.UserId)
|
||||
this.Users = await this.Database.Users.Where
|
||||
(u => !u.Banned)
|
||||
.OrderByDescending(b => b.UserId)
|
||||
.Skip(pageNumber * ServerStatics.PageSize)
|
||||
.Take(ServerStatics.PageSize)
|
||||
.ToListAsync();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue