Coming at this from a different tack then.
Does anyone know which function the Directory Search uses in order to accomplish the ajax querystring?
Any pointers would be gratefully received.
OK found it! The Member Directory Search now passes values straight into the loop using ajax querystring, this gets its data from the main get_users function and doesn’t use the search_users function.
Obviously I needed to modify the core to omit searching in certain profile fields by inserting ‘AND spd.field_id NOT IN (‘2′,’3′)’ into the sql before the search terms, but I understand that as of BP1.7 this will be reworked into BP_USER_QUERY and so will need changing anyway…
As an aside will the exclusion of searches for profile fields be doable in this new user_query? The reason is that if you are using any form of security/visibility on profile fields then you don’t want to be able to search on them. Currently, even if the profile fields are not visible it will return the user with that data in their field if the invisible data is used.
Hello, I’m looking for the place where the ajaxifying of Member Directory Search is implemented. Could you please give me a hint? Which files are you looking at? Thank you.
From what I remember, the ajax is done through the default theme _inc ajax.php file specifically the bp_dtheme_ajax_querystring() function found around line 91. This gains its data from the get_users() function found in bp-core bp-core-classes.php on line 201.
This is for bp1.6 though, as stated above I understand this has changed now and is done differently, so perhaps someone who has looked at this in 1.7 onwards can add to this thread.