Skip to Content
0
Former Member
Oct 10, 2006 at 04:07 PM

unlock a user through WD program

102 Views

Hi All, I need help on how to unlock the locked user (on portal) using WebDynpro programming. I have written the follwing code

IUserAccountFactory factory = UMFactory.getUserAccountFactory();

IUserAccount useraccount;

IUserAccount userAccount = null;

IUserAccount mUserAccount = null;

userAccount = factory.getUserAccountByLogonId(wdContext.currentUserdataElement().getUnique_id());

mUserAccount = factory.getMutableUserAccount(userAccount.getUniqueID());

// mUserAccount.setLocked(false,IUserAccount.LOCKED_NO);

mUserAccount.setLocked(false,IUserAccount.LOCKED_BY_ADMIN);

mUserAccount.save();

mUserAccount.commit();

I am getting error given bellow :

UME ExceptionUSER_AUTH_FAILED: User account for logonid "USER.PRIVATE_DATASOURCE.un:test3" not found!

note: test3 is the user id created by me. I am also not sure abt the following line

mUserAccount = factory.getMutableUserAccount(userAccount.getUniqueID());

What value should the method getMutableUserAccount() have? .Could some one help me .I promise to award points

Thank you in advance

Maruti