Skip to:
Content
Pages
Categories
Search
Top
Bottom

Autocomplete for Messages search all xprofile fields


  • mort3n
    Participant

    @mort3n

    Hi,

    I have autocomplete on searching all members in the message component via wp-config
    `define( ‘BP_MESSAGES_AUTOCOMPLETE_ALL’, true );`

    It seems strange to me that this does not just search names (user names, display names) but rather all xprofile fields.

    The autocomplete calls
    `BP_Core_User::search_users()`
    but this function searches all fields in the xprofile data table, see
    http://phpdoc.ftwr.co.uk/buddypress/BuddyPress/BP_Core_User.html#search_users

    It means that a user using autocomplete may be presented with irrelevant hence confusing results.

    An example is a school intranet for parents. In a parent’s profile is their name and the name of their child(ren), a likely scenario.

    I want to send a message to John Doe.

    Typing John will return not only parents with ‘John’ in their name, but also parents with a child called ‘John’ and also parents living on ‘John Street’ and so on and so on.

    Any hints to get around this are highly appreciated!

    Cheers
    Mort3n

  • The topic ‘Autocomplete for Messages search all xprofile fields’ is closed to new replies.
Skip to toolbar