Hi All,
I am trying to lock and unlock the users using UME api's.
This is the code which I had used.
**********************************************************************
com.sap.security.api.IUser user = UMFactory.getUserFactory().getUserByLogonID("test");
String userId = user.getUniqueName();
IUserAccountFactory uaf = UMFactory.getUserAccountFactory();
IUserAccount ua = uaf.getUserAccountByLogonId(userId);
IUserAccount uma = uaf.getMutableUserAccount(ua.getUniqueID());
IUserFactory uf = UMFactory.getUserFactory();
uma.setLocked(true,0);
uma.save();
uma.commit();
uf.invalidateCacheEntryByLogonId(userId);
************************************************************************
When I checked the status of this user "test" in user administration, the status is shown as locked. But when i tried to login with the user "test", I could login successfully.
Couldnt know how this happens. Any points to what is going wrong.
Thanks in advance.
Regards,
Yoga
PS: Useful answers will be rewarded.