Skip to Content
0
Former Member
Apr 16, 2010 at 05:47 AM

ISearchAttribute.LIKE_OPERATOR not working

50 Views

Hi

We are having a portal implementation where email Id of user is mapped with userId of a person and then he is allowed to login.

Now, the scenario is is email id of user is greater than 45 characters, then it is a requirement that we have to truncate that id to 44 characters and append an * after it.

Thus as email 01234567890123456789012345678901234567890123456789#host.com (# = @)

becomes 012345678901234567890123456789012345678901234*

Now we have to search all possible matches with upper email (with wildcard) match.

So we have used a search filter for this purpose.

email = 012345678901234567890123456789012345678901234*
IUserFactory userFactory = UMFactory.getUserFactory();
				IUserSearchFilter searchFilter = userFactory.getUserSearchFilter();
else
								searchFilter.setEmail(
									email,
									ISearchAttribute.LIKE_OPERATOR,
										false);
ISearchResult searchResult = userFactory.searchUsers(searchFilter);

But when I am trying to run abone code, it is giving me 0 results.

Do I need to make any modifications in search filter parameter settings !

Thanks