2 Replies Latest reply on Nov 20, 2012 9:50 AM by Sudipto Desmukh

    Programmatically locking user account in OID Jdev 11gR1

    Sudipto Desmukh
      Hi All ,
      Using Jdev

      Does anyone know an API using which we can lock a user's account in OID ?

      Though there is a way in which we can unlock the account programmatically -
          public void unlockAccount(User user) throws IMException {
              UserProfile usrprofile = user.getUserProfile();
              ModProperty mprop = new ModProperty("orclpwdaccountunlock",
      But as rightly pointed out in the below thread , passing the property orclpwdaccountunlock as 0 (assuming it would have locked the account )is not allowed.

      Error -
      [LDAP: error code 53 - Account Policy Error :9051: GSL_ACCOUNTUNLOCK_EXCP :Invalid value specified for orclpwdaccountunlock attribute.
      The only allowed value is 1];