Re: Making autocomplete work for all users
I solved this but only in a fashion. My solution is not update-proof. All I did was copy/paste/modify the relevant functions into my functions.php file.
Relevant functions (copy into child theme’s functions.php file):
– search_friends() in /plugins/buddypress/bp-friends/bp-friends-classes.php
– bp_dtheme_ajax_messages_autocomplete_results() from /plugins/buddypress/bp-themes/bp-default/_inc/ajax.php
Changes (in child theme’s functions.php file):
– renamed both functions (make sure to change all references within the code as well)
– changed $fids = implode( ‘,’, $friend_ids ); to $fids = implode( ‘,’, $wpdb->get_col( “SELECT $wpdb->users.ID FROM $wpdb->users”) );
– commented out the action hook from parent ajax.php file.
If someone knows a smarter way to do this… or at least a way to do it without having to hack the ajax.php parent file… let me know. Nothing I did in my child theme would remove that function. Nothing! Argh. At least the hack is simple. Just commenting out a single line at the bottom of the ajax.php file. I can deal with that.