cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching Currently Logged User in Portal from all Servers.

dhruv_shah3
Active Contributor
0 Kudos

Hi All,

I want to fetch the Currently online Portal Users and their name.

Also we want to fetch all users from different servers as we have load balancing.

Thanks & Regards,

Dhruv Shah

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

you can use UME API to get all the users of EP in WebDynpro appl.

Herewith i am giving you the UME API link --

http://help.sap.com/javadocs/NW04/current/um/index.html

here are the code:-

you can use this code to get the Poratl users as well as LDAP users from the server...

com.sap.security.api.IUser user = null;

try {

IUserFactory userFactory = UMFactory.getUserFactory();

IUserSearchFilter searchFilter = userFactory.getUserSearchFilter();

ISearchResult searchResult = userFactory.searchUsers(searchFilter);

int count = 0;

List list = new ArrayList();

while (searchResult.hasNext()) {

count++;

String uniqueid = (String) searchResult.next();

user = userFactory.getUser(uniqueid);

list.add(user.getUniqueName());

}

Sorting sort = new Sorting();

List l1 = new ArrayList();

l1 = sort.Sorting(list);

Iterator iter = l1.iterator();

String strUser = "";

while (iter.hasNext()){

strUser = iter.next().toString();

svs4.put(strUser,strUser);

}

} catch (Exception e) {

wdComponentAPI.getMessageManager().reportException("Exce in getting users::"+e,true);

or

You can also use this code

IGroup group_Portal_Everyone = UMFactory.getGroupFactory().getGroupByUniqueName("Everyone");

Users_Portal_Everyone = group_Portal_Everyone.getUserMembers(true);

}

May be this'll help you.

Regards,

Deepak