on 05-17-2007 10:12 AM
Hi,all
How can I get the prtal user for changing his properties?
I know how to change user password for examole:
IUserAccount iuacc = UMFactory.getUserAccountFactory().getUserAccountByLogonId(userName);
IUserAccount account = UMFactory.getUserAccountFactory().getMutableUserAccount(iuacc.getUniqueID());
userName I have,
and after that I can set a new password for him:
account.setPassword(password);
account.setPasswordChangeRequired(false);
account.save();
account.commit();
And what I need is to change his email,telefon .
How I get specified user for update?
Regards,
Michael
Michael,
Use IUserMaint API to get <i><b>write</b></i> access to a user.
try
{
final IUserFactory userFactory = UMFactory.getUserFactory();
IUser user = WDClientUser.getCurrentUser().getSAPUser();
IUserMaint userMaintData = userFactory.getMutableUser(user.getUniqueID());
userMaintData.setCellPhone("1234");
userMaintData.setEmail("a@b.com");
userMaintData.commit();
}
catch (UMException e)
{
e.printStackTrace();
}
catch(WDUMException e)
{
e.printStackTrace();
}
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use this.
try {
final IUserFactory userFactory = UMFactory.getUserFactory();
// Specify the Logon id of the user here in the next line
IUser user = UMFactory.getUserFactory().getUserByLogonID("<log on id of user>");
IUserMaint userMaintData = userFactory.getMutableUser(user
.getUniqueID());
userMaintData.setCellPhone("1234");
userMaintData.setEmail("a@b.com");
userMaintData.commit();
} catch (UMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Bala
Hi Michael,
to solve this issue you must perform two steps:
STEP ONE (on EP)
System Administration -> System Configuration -> Data Sources
Download the file dataSourceConfiguration<XXX>.xml and set the tag <dataSource> attribute isReadonly="false"
System Administration -> System Configuration -> SAP System
Check Backend data to wich UME connect to and register the user id (such as SAPJSF_<SID>), that is the user that access from the portal to backend to access to the user data
STEP TWO (on backend SU01)
Insert the user id registered before and check these assigned roles:
- "SAP_BC_JSF_COMMUNICATION_RO" then from the EP will be possibleto access to User Data in Read Only mode
- "SAP_BC_JSF_COMMUNICATION" then from the EP will be possibleto access to User Data in Write/Read mode
After the role assign generate the Authorization Profiles properly.
Finally restart the J2EE Engine.
Per more info about the user configuration please read:
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/8f/67d27676ace84080964d4c4223bb3c/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/8f/67d27676ace84080964d4c4223bb3c/content.htm</a>
Reward points for helpful answers.
Best regards,
Gianluca Barile
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.