Fix banned user photos appearing on Gallery
This commit is contained in:
parent
df65b1b260
commit
eb913844f7
|
@ -270,9 +270,9 @@ func PaginateGalleryPhotos(user *User, conf Gallery, pager *Pagination) ([]*Phot
|
||||||
placeholders = append(placeholders, filterVisibility)
|
placeholders = append(placeholders, filterVisibility)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only certified user photos.
|
// Only certified (and not banned) user photos.
|
||||||
wheres = append(wheres,
|
wheres = append(wheres,
|
||||||
"EXISTS (SELECT 1 FROM users WHERE id = photos.user_id AND certified = true)",
|
"EXISTS (SELECT 1 FROM users WHERE id = photos.user_id AND certified = true AND status='active')",
|
||||||
)
|
)
|
||||||
|
|
||||||
// Exclude private users' photos.
|
// Exclude private users' photos.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user