Is there a similar module to allow autocompletion for user references using real names in D7. It doesn't look like there are plans to port this module to D7. Are there other modules/solutions to this issue in D7?

Files: 
CommentFileSizeAuthor
#18 user_reference-realname-search.patch1022 byteserykmynn
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch user_reference-realname-search.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]
#11 user-reference-autocomplete_on_realname.patch1.11 KBliquidcms
FAILED: [[SimpleTest]]: [MySQL] Invalid patch format in user-reference-autocomplete_on_realname.patch.
[ View ]

Comments

+1

I don't know about D7 since I'm still on D6 for the site thats needs that module and don't plan to upgrade any time soon, sorry. I confirm that there are also no plans to port this module to D7, but I'll leave that issue open to let you talk about alternatives.

subscribing

subscribing

i think Views/CCK (in D6 as well) is able to do what this module does by simply making a View that lists the Realnames of the users and then having the field use that View as it's reference.

still some bugs in Views for doing this.. but more or less works (you must keep Label enabled and then just not fill anything in): http://screencast.com/t/xD8bePe7xsO

the list shows realnames but once picked the field shows username... but close.

not sure what the autocomplete is on.. will test

hmm.. nope.. sadly the autocomplete is on the username; not on the value that shows from the View.. this is likely a bug in some module, perhaps References.

liquidcms, could you elaborate on what you meant in #5?

Hi alice, which of my points in #5 are you asking about? i stated quite a few things there.

the screeshot shows most of what i meant pretty clearly.. the selector being shown for item 2 shows the View of realnames being used as the reference for this field (which is good), but item 1 "student1 [uid=5]" shows that it still lists the username once selected.

the 3rd point is what does the autocomplete search on.. and sadly it is still on username.

to be even more clear, by example.. from my example in screenshot:

username      realname
======      ======
student1        Student One
student2        Student Two

if i type "two" for autocomplete it will not match anything, but "ent2" will.

The search part of references module's views implementation is hard-wired to the name field. I'm not sure if they'd be into changing that (or if it's even possible without major changes).

i posted part of the solution with a module i just whipped up here: #1296254: userreference formatter

this adds realname formatters for userref fields.

tomorrow i'll likely look at doing an autcomplete widget that works off realname and add it in with this module

assuming i have both of these in place; does that make the D7 version of this module?

StatusFileSize
new1.11 KB
FAILED: [[SimpleTest]]: [MySQL] Invalid patch format in user-reference-autocomplete_on_realname.patch.
[ View ]

this patch fixes the userref autocomplete to search on realnames but has a dependency on the realname module.. not sure if that's a big deal or not.

Status:Active» Needs review

Peter, not sure how to test the patch you provided. The files it refers to aren't in this module and user_reference doesn't exist as a module that I can see:

http://drupalcode.org/project/realname_userreference.git/tree

ahh.. sorry.. i think i forgot what project this post was initially started on.. i don't think (at the time) there was a realname userref port to D7; and work was being done on the references project to support this sort of feature. my patch is actually on that module.

Project:Realname Userreference» References
Version:6.x-1.x-dev» 7.x-2.x-dev
Priority:Normal» Major

As patch at #11 is for user reference module I am changing project for this issue.

Title:Realname user-reference for D7?Realname support in user-reference for D7?

Status:Needs review» Needs work

The last submitted patch, user-reference-autocomplete_on_realname.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new1022 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch user_reference-realname-search.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]

The patch worked great for me. It shouldn't be dependency because it just provides it if its there but doesn't rely on it. I think the patch failed for having some non-standard header lines. I am uploading the version I used, but it only works with some fuzz since the line numbers and some of the surrounding lines are now out of date. Regardless it worked for me, and adds this cross-module support which is totally key for User Reference and Realname to play nice (and work as someone would expect).

Status:Needs review» Needs work

The last submitted patch, user_reference-realname-search.patch, failed testing.

When you enable realname, will 'rn.realname' exist straight away for every user?
Why have you only changed code for 'contains' matching but not the others? Wouldn't validation fail in some cases because of this?

Real name is 'incompatible' with several modules because of it's design. It does not replace usernames, but rather adds it's own data, as it is possible for two people to have the same real name. This is also the reason it is an unreliable candidate for an autocomplete, though node reference has an issue with that too.

There is a patch to realname in http://drupal.org/node/985944 to replace the user/autocomplete with realname autocomplete. This might "just work (tm)" if references currently is using user/autocomplete.

Ok, so this is a new module, right? Just looks like you renamed it.

Either way would be good to have the code reviewed and have it up on d.o.

There is a patch to realname in http://drupal.org/node/985944 to replace the user/autocomplete with realname autocomplete. This might "just work (tm)" if references currently is using user/autocomplete.

Unfortunately, the References module uses its own autocomplete (at user_reference/autocomplete/%/%/%), so it will require more work to either start using user/autocomplete or integrate with Realname properly.