cancel
Showing results for 
Search instead for 
Did you mean: 

Getting user details from LDAP

former_member188556
Active Contributor
0 Kudos

Hi,

I have to write an application where i have to get the details of user from LDAP.

In this scenario, we have the users spread in Standard Portal Users and more in the LDAP.


IUserFactory userFactory = UMFactory.getUserFactory();
IUserSearchFilter searchFilter = userFactory.getUserSearchFilter();
		
searchFilter.setFirstName("abc*", ISearchAttribute.LIKE_OPERATOR, false);
ISearchResult searchResult = userFactory.searchUsers(searchFilter);

Using this code i can get details of all the portal users. But cant find the LDAP Users.

Any help will be appreciated.

Regards

BP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi BP,

Is your LDAP configured to Portal UME. Is so then you can access the user details using the below code:

IWDClientUser wdUser = WDClientUser.forceLoggedInClientUser();

IUser user = wdUser.getSAPUser();

String Username = user.getUniqueName();

Regards,

Jhansi

former_member188556
Active Contributor
0 Kudos

Hi Jhansi,

Do u think that it will iterate all the ume users?

IWDClientUser wdUser = WDClientUser.forceLoggedInClientUser();

IUser user = wdUser.getSAPUser();

String Username = user.getUniqueName();

How will this give all the users?

Please give me more clarity

BP

Former Member
0 Kudos

Hi BP,

The code is used to retrieve the currently logged in Portal User. You can refer to the following thread to get all the users.

Regards,

Jhansi

Answers (0)