cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to lock user through Web Dynpro

Former Member
0 Kudos

Hi

I am getting following exception while trying to lock a user in WAS.

UMRuntimeException: Maint method setLocked cannot be used because the principal is not mutable!

i have written the following code

<i>try {

IUserAccountFactory userAccountFactory = UMFactory.getUserAccountFactory();

IUserFactory userFactory = UMFactory.getUserFactory();

IUser user = userFactory.getMutableUser(wdContext.currentUserDetailsElement().getUniqueID());

IUserAccount[] accounts = user.getUserAccounts();

wdComponentAPI.getMessageManager().reportSuccess(accounts[0].getUniqueID());

accounts[0].setLocked(true,accounts[0].LOCKED_BY_ADMIN);

} catch (UMException ex) {

wdComponentAPI.getMessageManager().reportSuccess(

"UME Exception" + ex.getMessage());

}

</i>

Do you have any solution.

Regads

Shobhan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Shoban,

Could you able to manage lock the user?. Could you please pass me the code. Thank you in advance

Regards

Maruti