Somebody on the BuddyPress support forums had this to say:
I don’t recommend to change the core files of buddypress. The best way
to do it is to write a custom code (I don’t know how to guide you). So
if you don’t mind changing the core files, here is a quick way.Open
/buddypress/bp-core/bp-core-classes.php
and change the$sql['where_searchterms'] = “AND pd.value LIKE ‘%%$search_terms%%’”;
to
$sql['where_searchterms'] = “AND (pd.value LIKE ‘%%$search_terms%%’ OR u.user_login LIKE’%%$search_terms%%’)” ;
If someone can guide us how to do it in
bp-custom.php
, it would be
great.