I try to change the autocomplete method from default "starts with" to "contains" changing line 325 of method realname_autocomplete() in realname.module:

$name_like->condition('rn.realname', '%' . db_like($string) . '%', 'LIKE');

This doesn't have any effect at all, isn't it this part of the code which handles the autocomplete with realnames?

Comments

ey’s picture

I've changed the lines 325-326 as following, and it does the work:

    $name_like->condition('rn.realname', '%' . db_like($string) . '%', 'LIKE');
    $name_like->condition('u.name', '%' . db_like($string) . '%', 'LIKE');
ey’s picture

Here is the patch file

hass’s picture

Category: support » feature
Status: Active » Closed (duplicate)