on 12-20-2011 8:33 PM
Hi
I have one requirement for find the provided e-mail id is valid id or not. I need to build one custom webdynpro application. that application should accept the e-mail id and it should check against Portal UME whether that e-mail id exist or not if not i should indicate that id -not valid e-mail id.
Please let me know how implement this using UME API. Provide some sample code for it.
Thanks
Dear Guru,
Please refer to the below documents:
http://help.sap.com/javadocs/NW04S/current/se/overview-summary.html
Best Regards
Arun Jaiswal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can check this piece of code for checking email of the logged in user.
String strUserName = null;
String strUserLocation = null;
String strUserDepartment = null;
String UID = null;
try {
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
IUser sapUser = wdClientUser.getSAPUser();
if (sapUser != null) {
IUserAccount[] acct = sapUser.getUserAccounts();
if (acct[0] != null) {
strUserName = acct[0].getDisplayName();
// wdComponentAPI.getMessageManager().reportSuccess("userName"+strUserName);
UID = acct[0].getUniqueID();
IUser user = UMFactory.getUserFactory().getUserByLogonID(
strUserName);
user.getEmail();
// strUserLocation = user.getCountry().toString();
// strUserDepartment = user.getDepartment().toString();
// wdComponentAPI.getMessageManager().reportSuccess("userLocation"+strUserLocation);
// wdComponentAPI.getMessageManager().reportSuccess("userDepartment"+strUserDepartment);
// wdContext.currentExtraElement().setDepartment(
// strUserDepartment);
// wdContext.currentForProcessElement().setDepartment(strUserDepartment);
// wdContext.currentForProcessElement().setLocation(strUserLocation);
String uniquename = user.getUniqueName();
wdContext.currentExtraElement().setLastName(uniquename);
// wdContext.currentContextElement().getUmeRole(user.get);
// wdContext.currentExtraElement()
// .setLocation(strUserLocation);
}
}
} catch (WDUMException e) {
// wdComponentAPI.getMessageManager().reportSuccess("ex1"+e.getLocalizedMessage());
} catch (UMException e) {
// wdComponentAPI.getMessageManager().reportSuccess("ex2"+e.getLocalizedMessage());
}
Thanks and regards
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the below code for searching:
IUserFactory userFactory = UMFactory.getUserFactory();
IUserSearchFilter userFilter;
userFilter = userFactory.getUserSearchFilter();
userFilter.setEmail(<email id>, ISearchAttribute.LIKE_OPERATOR/EQUAL_OPERATOR, false);
ISearchResult userResult;
userResult = userFactory.searchUsers(userFilter);
Regards,
Mahesh
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.