Now lets look at the other important functionalities provided by the UserManager class.
1) Code
2) Result
User is locked/unlocked/disabled/enabled as expected
3) JavaDoc
You can find more information about the UserManager class and its methods in the javadoc link.
1) Code
public void misc(OIMClient oimclient){UserManager usrMgr = oimclient.getService(UserManager.class);try {usrMgr.lock("65", true, true);usrMgr.unlock("65", false);usrMgr.disable("65", false);usrMgr.enable("65", false);} catch (ValidationFailedException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (UserLockException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (NoSuchUserException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (AccessDeniedException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (UserUnlockException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (UserDisableException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (UserEnableException e) {// TODO Auto-generated catch blocke.printStackTrace();}}
2) Result
User is locked/unlocked/disabled/enabled as expected
3) JavaDoc
You can find more information about the UserManager class and its methods in the javadoc link.