I suppose this is a bug, but perhaps it's more along the lines of a feature request or a problem issue for core(?). One of my testers noted that if you do a search for a real name "Bob Jones" using the core search function, it won't show up under the user's tab of the search report, which apparently only searches on username ("bobj1234").

It would be nice for users to search for other users by Real Name.

CommentFileSizeAuthor
#4 realname_6x_07.patch2.96 KBNancyDru
#2 realname_6x_07.patch1015 bytesNancyDru
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NancyDru’s picture

Category: bug » feature

This would be a feature request. I dislike dealing with search almost as much as WYSIWYG modules... But you are right, this needs to be in there.

NancyDru’s picture

Status: Active » Needs review
FileSize
1015 bytes

Please try the attached patch. It uses the standard search item limit.

NancyDru’s picture

No, that only indexes it. More in a bit.

NancyDru’s picture

FileSize
2.96 KB

Let's try this one. The search will work for either RealName or user name. Unlike the user module, it will not search on the mail address.

NancyDru’s picture

Status: Needs review » Fixed

I committed this patch. I want to get a new release out and wanted some testing before I had to commit it.

bobgeier’s picture

Sorry, NancyDru, I'm just getting back around to this.

Trying the March 12 -dev release, I'm not getting a realname match on user searches, even after forced re-indexing.

bobgeier’s picture

Status: Fixed » Active
NancyDru’s picture

Status: Active » Fixed

There should be a roll-up occurring any minute now; it will be dated either March 13 or 14. You could also use the patch.

roball’s picture

Worked for me. I logged in as an unprivileged user and searched for my first name. The result came up in the "User name" tab (but not in the "Users" tab). The result showed my real name in both the "Login name" and "User" fields. I would prefer not to get any "Login name" information as a search result at all, because the reason of using the RealName module is to avoid unveiling usernames as good as possible. But this way it's just redundant information.

NancyDru’s picture

I just did a change that will only show that info to people with 'administer users' permission.

The "Users" tab comes from the User module; I have no control over it.

roball’s picture

Good, now the "Login name" information will no longer be shown to unprivileged users. However, they are still able to search for a login name and then get the matching real name as a result. Isn't the main purpose of RealName to hide the login names wherever possible?

NancyDru’s picture

Well, that actually was not my original intent, but it does seem to be the intent of many of you who are using it. The reason I have the login name in the search index is so the admin can more easily find a user. Is this not necessary?

roball’s picture

That is totally OK for admins, but IMO users that don't have the administer users permission should not be able to unveil login names at all. That also includes finding them from the search index, which can often be a security problem.

NancyDru’s picture

I'm making it an option whether or not to index them. But the commit will have to wait for me to get back from church.

roball’s picture

Very great, Nancy! The 2009-Mar-16 dev version of 6.x-1.x with the new Search options

    [+] Enable realname search
    [ ] Include login name in search

works perfectly for me! The realname.module search could than be a more secure replacement for the user.module search feature. Now when there would be an option to remove user.module's search tab, that would be perfect.

NancyDru’s picture

I didn't have that option because I hadn't figured out how. The Search module has a very interesting hook_menu...

But check your "general" setting tab now...

roball’s picture

Priority: Normal » Minor

Thank you for the new Disable user search option! I enabled it, which hides the tab linked to the user.module search. However, user.module's search is still active when accessed directly via it's URL.

NancyDru’s picture

I would suggest a feature request against the user module to make it optional.

I'm not crazy about completely deleting a core-provided menu item. Unless you think it's going to be a major problem leaving an invisible menu item (and there are many in core even), I'm inclined to leave it as is.

roball’s picture

No problem here - thus I have decreased the priority to minor. The way it is now is totally OK for me. Thanks for the new search feature anyway.

NancyDru’s picture

Status: Fixed » Closed (fixed)
roball’s picture

A side effect of the enabled Disable user search option is that every now and then I am on an admin page, the message User module search disabled. appears prominently.

roball’s picture

The problem mentioned in my reply #21 persits also in the latest dev version from today (2009-Mar-20). Every time I go to admin/build/modules, the info message is shown on the top.

NancyDru’s picture

It should be coming out only when you rebuild the menus, which admin/build/modules will do. I guess I should change that somehow.

NancyDru’s picture

I moved the message to the admin page.