Member Search: Usually apply certified-only filter
Always filter for certified members unless the user specifically searches for non-certified or "all users". Admin searches for banned/disabled also search all users.
This commit is contained in:
parent
02ec0a9116
commit
88663d48a4
|
@ -82,6 +82,13 @@ func Search() http.HandlerFunc {
|
|||
isCertified = "true"
|
||||
}
|
||||
|
||||
// Always filter for certified-only users unless the request specifically looked for non-certified.
|
||||
// Searches for disabled/banned users (admin only) should also reveal ALL users including non-certified.
|
||||
var certifiedOnly = true
|
||||
if isCertified == "false" || isCertified == "all" || isCertified == "disabled" || isCertified == "banned" {
|
||||
certifiedOnly = false
|
||||
}
|
||||
|
||||
pager := &models.Pagination{
|
||||
PerPage: config.PageSizeMemberSearch,
|
||||
Sort: sort,
|
||||
|
@ -95,7 +102,7 @@ func Search() http.HandlerFunc {
|
|||
MaritalStatus: maritalStatus,
|
||||
HereFor: hereFor,
|
||||
ProfileText: search,
|
||||
Certified: isCertified == "true",
|
||||
Certified: certifiedOnly,
|
||||
NotCertified: isCertified == "false",
|
||||
InnerCircle: isCertified == "circle",
|
||||
ShyAccounts: isCertified == "shy",
|
||||
|
|
Loading…
Reference in New Issue
Block a user