on 06-10-2009 7:58 AM
Hi All,
Is it possible to generate the password for the portal user created through code?
Note: Portal user is also created through wendynpro java code.
Regards,
V Karthi
Pls check the mention WIKI link and in setpasswordChangeRequired method formal parameter is boolean
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
for setting up the initial password for the user you can call the below method,When the user will logon he has to change the password if password change required is true after setting the custom password.
void setPasswordChangeRequired(boolean chng)
Sets the PasswordChangeRequired attribute of the IUserAccount object.
Updated:
also i think that in EP 7.0 after setting the pass when the user will logon portal will automatically prompt for the new passward even if you are not calling the passwordChangeRequired method,try it.
Also check the following WIKI for EP user creation and amendment.
same code mentioned in the WIKI can be used in WD java with small modifications:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/createandeditEPuserwithJava+code
Rgds,
Siddharth
Edited by: Siddharth Jain on Jun 10, 2009 11:26 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Basic requirement of Change password is:
you should provide original password.
In any case with out providing original password if you are changing tha password, it is technically equlas to set a new password.
User's loggin doesn't always means first name or second name. If you have User Management tab available in portal, then search for any user, there you can see a field named Loggin Id. Technical name to access this parametre is IUser.getUniqueName().
Regards,
SrinivaS
Hi,
yes you can change a user's password through WDJava.
Change Password:
try{
IUserFactory userfact = UMFactory.getUserFactory();
//get user id of the user to change the password
String userId = wdContext.currentLicenceUsersOutputVNElement().getUserid();
//get user object
IUser specifiedUser = userfact.getUserByLogonID(userId);
//get user maintance object
IUserMaint userMaint = userfact.getMutableUser(specifiedUser.getUniqueID());
//get user account
IUserAccount uacc = UMFactory.getUserAccountFactory().getUserAccountByLogonId(userId);
//create mutable user account
IUserAccount iuacc = UMFactory.getUserAccountFactory().getMutableUserAccount(uacc.getUniqueID());
iuacc.setPassword(wdContext.currentContextElement().getNewPassword());
iuacc.save();
iuacc.commit();
manager.reportSuccess("Password has been reset.");
}
catch (Exception e)
{
manager.reportException("error occured " + e , false);
e.printStackTrace();
}
Regards,
SrinivaS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karthi,
Can you see the user that you have created in UME of Portal ?
If you can, then you should be able to generate intial password for this user too.
Thanks & Regards,
Vipin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.