Prevent showing all members in Search list

11 years 8 months ago #208793 by davidjoomla11
Prevent showing all members in Search list was created by davidjoomla11
The search list is very useful for using criteria to narrow search. However if a user leaves all the criteria empty and click search, the entire list of members is shown.

How can this be prevented?

Tried making one of the fields "required" for registration. But when it comes to search, that field can still be left empty.

Thanks in advance for helping .

Please Log in to join the conversation.

11 years 8 months ago #208844 by krileon
I suppose you could add filters to the userlist to filter out anyone that has empty fields. Aside from that it's working as intended.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 8 months ago #208989 by davidjoomla11
Replied by davidjoomla11 on topic Re: Prevent showing all members in Search list
Krileon, while we appreciate your help many times, some days you just don't seem to get the issues and are not providing constructive replies.

Here I'm referring to a user doing a search. If he does not choose any value for all the fields criteria and click search, the entire list of members will be shown. Is this your intended feature? Then it is strange. If any site owner wants to allow searchers to see all the members at one go, they can use the "List All" which is available. But your current feature does not allow control on to prevent this. It's a loophole.

Adding filter to the users list is another purpose altogether. So this has nothing to do with whether the members (not searchers) fill in the fields or not.

Possible solutions:
1) When no values are selected, the result is a notification to enter values. OR
2) Let the search function share the same "Required" feature as the one during registration or edit. That forces the searcher to key in a value for specific fields which are "required".

If you have other easier ways, please share.

Please Log in to join the conversation.

11 years 8 months ago #209012 by krileon
If you search with no criteria it's the same as using "List All"; yes that's intended. There is no way to disable this without editing the core code or creating a plugin that utilizes the userlist triggers and empties out the results when no criteria is provided.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 8 months ago #209074 by imagiprint
Replied by imagiprint on topic Re: Prevent showing all members in Search list
That's a serious issue ! I'm facing the same problem: I would like to prevent showing all the users when no search criteria are selected.
Which part of the code should I modify to invite the user to enter a search criteria if he left everything empty ?

regards

Please Log in to join the conversation.

11 years 8 months ago #209094 by krileon

Which part of the code should I modify to invite the user to enter a search criteria if he left everything empty ?

I can't help you with that. We do not support core edits. You can do this using triggers in a new plugin. Please see below tutorial on how to do this with triggers.

www.allmysocials.com/directory/tutorials/item/228-event-triggers


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.218 seconds

Facebook Twitter LinkedIn