on 04-03-2006 7:56 PM
Hi all,
I would like to search the LDAP/ UME and retrieve a user using the e-mail id defined in the user's profile.
Thanks in advance
Rgds,
Subu
Hi Subramaniyam,
This should not be a tough job -
Have a look at the code snippet below ...
It searches the users based on the first name.
Just replace the Attribute "firstname" with the attribute for emailid
IUserFactory userFact = UMFactory.getUserFactory();
//getting UserFilter for first name
IUserSearchFilter userFilter1 = userFact.getUserSearchFilter();
//setting search attributes for userFilter1
userFilter1.setSearchAttribute(
IPrincipal.DEFAULT_NAMESPACE,
"firstname",
IConstants.str_fname,
ISearchAttribute.LIKE_OPERATOR,
false);
//populating result for first name
ISearchResult result1 = userFact.searchUsers(userFilter1);
The result1 contains the results i.e. all those who match the given first name.
Thanks,
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.