The realname module overrides the core user/autocomplete to allow searching by the real name, but Views uses a different autocomplete callback: admin/views/ajax/autocomplete/user. It'd be great if realname could override that as well!

The behavior is a little different, because views supports multiple values with commas, but I think it should be possible to make a special callback function for views that calls to realname_autocomplete() to do the real work.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
FileSize
2.4 KB

Here's a patch that works in my testing. Unfortunately, because realname_autocomplete() ends with drupal_json_output() we can't call it in the implementation of the Views autocomplete callback, so this has some copy-paste from that function. A little refactoring could put the shared code into a new function, but I just wanted to share this right away - it's only a first pass :-)

bwood’s picture

Status: Needs review » Reviewed & tested by the community

We have committed this to our distribution and it's working beautifully on over 100 sites.

hass’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Need tests

I agree, we should add this, but we need tests to make sure nothing get's broken. We also need a D8 patch first.

hass’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev