on 08-08-2005 4:40 AM
Iam struggling to get UniqueID or UID when i know Display Name of a user in Portal.
Is it through ISearchResult?
//dname is the string -> Display Name of User
try{
IUserSearchFilter userFilt = userFact.getUserSearchFilter();
userFilt.setDisplayName(dName,ISearchAttribute.EQUALS_OPERATOR, false);
ISearchResult result = userFact.searchUsers(userFilt);
if(result.getState()==ISearchResult.SEARCH_RESULT_OK){
while(result.hasNext()){
String uniqId= (String) result.next();
IUser thisUser = userFact.getUser(uniqId);
response.write(thisUser.getDisplayName().toString());
}
}
}catch...........
How wud i catch UniqueID of a user??
Somebody plz hint me ...
HI Peter
Try out with the following links. That might help you
https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://
https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://
http://help.sap.com/saphelp_nw04/helpdata/en/5a/84b83b3683094be10000000a11402f/frameset.htm
Regards
Rajeev.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am Sending you a link.. which shuld solve your problem, It will give the user ids of users...
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/code-samples/li... logged on users code sample download.abst
vinod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
Try this code:
String logonID = user.getUid();
IUserAccount accounts[] = null;
try {
accounts = user.getUserAccounts();
} catch (UMException e) {
response.write(("<br>Error getting accounts: " + e.getLocalizedMessage());
}
if (accounts != null) {
response.write("<br>Number of Login Accounts: " + accounts.length);
for (int i = 0; i < accounts.length; i++) {
response.write(
"<br>** Login ID #" + i
+ ": LogonUID=" + accounts<i>.getLogonUid()
+ ", AssignedUID=" + accounts<i>.getAssignedUserID());
response.write(
"<br>Last Login: "
+ accounts<i>.getLastSuccessfulLogonDate().toString());
response.write(
"<br># Logins: " + accounts<i>.getSuccessfulLogonCounts());
}
}
Regards,
Pooja.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi peter,
you may try this code..
try {
IWDClientUser wdUser = WDClientUser.getCurrentUser();
IUser user = wdUser.getSAPUser();
if (user != null)
{
IUserAccount[] acct = user.getUserAccounts();
if(acct[0] != null)
{
String strUserid = acct[0].getLogonUid();
wdContext.currentZtms_Fm_Regupdate_InputElement().setAssoid(new String(strUserid));
}
}
}
or try this PDF for more details regarding UME.
regards,
Vinod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
26 | |
9 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.