Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | realname-views-autocomplete-2926684-2.patch | 2.4 KB | dsnopek |
|
Comments
Comment #2
dsnopekHere's a patch that works in my testing. Unfortunately, because
realname_autocomplete()
ends withdrupal_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 :-)Comment #3
bwood CreditAttribution: bwood as a volunteer commentedWe have committed this to our distribution and it's working beautifully on over 100 sites.
Comment #4
hass CreditAttribution: hass commentedI agree, we should add this, but we need tests to make sure nothing get's broken. We also need a D8 patch first.
Comment #5
hass CreditAttribution: hass commented