U4-2467 - v4.11.1: Membership search does not search on email address anymore

Created by Bob van Zuilen 05 Jul 2013, 09:19:02 Updated by Sebastiaan Janssen 18 Jul 2013, 09:07:46

Problem: When I login as admin and search using the tree (/members/members/search), entering an e-mail address will return no result. IIRC, this could be done in previous versions and is important for member who forgot their login name. I cannot find an issue that discusses this, so I am submitting one.

Analysis: I had expected the function to search on all defined fields in the /config/examineIndex.config file but it turns out that is was hard coded to use the nodeName field only.

Suggested solution: In project umbraco.web (umbraco.dll), /umbraco.presentation/umbraco/members/MemberSearch.ascx.cs in the search button click event handler (ButtonSearch_Click), change the criteria in the else part of the if (!Member.InUmbracoMemberMode()) if..then..else:

old version: var criteria = internalSearcher.CreateSearchCriteria("member", Examine.SearchCriteria.BooleanOperation.And); var operation = criteria.Field("__nodeName", query.MultipleCharacterWildcard());

suggested code (replace by): var criteria = internalSearcher.CreateSearchCriteria("member", Examine.SearchCriteria.BooleanOperation.Or); var fields = new[] { "id", "__nodeName", "email" }; var term = new IExamineValue[] { query.ToLower().Escape() }; var operation = criteria.GroupedOr(fields, term);

Comments

Sebastiaan Janssen 18 Jul 2013, 09:07:41

Fixed in changeset a79e349f3de550f5dbd9d326f66756aeb331bf17


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Inline code

Affected versions:

Due in version: 6.1.3

Sprint:

Story Points:

Cycle: