Hi

Is there any option to remove the list of users displayed in result area by default. I disabled the display option , also tried working with the various files that came with the module, but cant seem to get a work around for it. What i want is the result area to be blank , and should display the results only when the users issues a search.

Regards
Jay

Comments

pukku’s picture

Assigned: Unassigned » pukku
Status: Active » Postponed

Hi! Right now, this cannot be done. I will look at it after I have completed the next planned feature.

Ricky

jayakrishnan-1’s picture

Thank You , looking forward to it

Regards
Jay

pukku’s picture

Hi! I just realized that, if you are comfortable with PHP, you would be able to sort-of fake this using a small local module. The key is that you need to hook into the search process and create a search criteria that is initially never true, but once a submission occurs, is true.

There are two hooks: hook_site_user_list_search_form() and hook_site_user_list_restrict(). If you look at site_user_list.module, you can see examples for the profile module near the end. The idea would be to provide a hidden form element in ...search_form() which is always set to true. Then, in ...restrict(), you would add a 'where' clause of '0=1' unless the element was true. This way, the first time you go to the page, the value of the element would be false, so ...restrict() would add a 'WHERE 0=1' to the SQL query, which will cause no results to be returned. Once a search is submitted, the element becomes true, so ...restrict() doesn't append anything.

The only trick with this is that the display will not be quite what you want; it will show a table for the users, and tell you that there were no results matching.

HTH,
Ricky

pukku’s picture

Issue summary: View changes
Status: Postponed » Closed (won't fix)