on 03-21-2008 5:38 PM
I am having an issue getting the portal username for all the available portal accounts. We are using LDAP for our UME Store.
First of all, I obtain the portal user list via UMFactory:
IUserFactory uf = UMFactory.getUserFactory();
try {
ISearchResult ids = uf.getUniqueIDs();
while (ids.hasNext()) {
String uid = (String) ids.next();
IUser sapUser = uf.getUser(uid);
IUserAccount sapUserAccount = sapUser.getUserAccounts()[0];
.....
}
}
catch(Exception ex) {
wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(ex), true);
}
The problem is that all the following return something that is NOT a username that would be used to login, but rather what looks like it might be an LDAP account id number:
sapUserAccount.getLogonUid();
sapUser.getUniqueName();
sapUser.getName();
When I look at User Administration on the Portal Admin, I see the same list that I get back from the UMFactory (as expected).
My question is how can I get the username the user would log in as so I can display it in my list?
If the user logs into the portal and I grab the current user I get the username when calling the above methods. Any help available?
As a follow-up, let's say I have 1 portal user established in UME and 1 that is linked through LDAP. Portal user is
username Fred, LDAP user is username Barney.
When I go into User Administration and select the UME as the datasource I see the one portal user with Logon ID as Fred. When I set LDAP as the datasource I see one user with Logon ID as Barney. So far so good.
When I get the user list from UMFactory (using the method I posted above) I get two users, one with logon id of Fred (portal users show up fine) and one with logon id of 23C48754N$ (all LDAP user accounts show up with these odd ids).
What I need is to get a userlist that has two users, one with username of Fred and one with username of Barney.
Any help would be GREATLY appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.