public boolean isAccountLocked(AMIdentity amIdentity){
  boolean isLocked=false;
  if (!memoryLocking) {
    try {
      if (lockoutAttrName != null && lockoutAttrValue != null) {
        Set attrValueSet=amIdentity.getAttribute(lockoutAttrName);
        if ((attrValueSet != null) && (!attrValueSet.isEmpty())) {
          Iterator i=attrValueSet.iterator();
          String attrValue=(String)i.next();
          isLocked=attrValue.equals(lockoutAttrValue);
        }
      }
      if (!isLocked) {
        Set attrValueSet=amIdentity.getAttribute(USER_STATUS_ATTR);
        if ((attrValueSet != null) && (!attrValueSet.isEmpty())) {
          Iterator i=attrValueSet.iterator();
          String attrValue=(String)i.next();
          isLocked=attrValue.equals(USER_INACTIVE);
        }
      }
    }
 catch (    Exception e) {
      debug.error("Error inactivating user account",e);
    }
  }
  if (debug.messageEnabled()) {
    if (isLocked) {
      debug.message("Account is locked");
    }
 else {
      debug.message("Account is unlocked");
    }
  }
  return isLocked;
}

public boolean isAccountLocked ( AMIdentity amIdentity ) { boolean isLocked = false ; if ( ! memoryLocking ) { try { if ( lockoutAttrName != null && lockoutAttrValue != null ) { Set attrValueSet = amIdentity . getAttribute ( lockoutAttrName ) ; if ( ( attrValueSet != null ) && ( ! attrValueSet . isEmpty ( ) ) ) { Iterator i = attrValueSet . iterator ( ) ; String attrValue = ( String ) i . next ( ) ; isLocked = attrValue . equals ( lockoutAttrValue ) ; } } if ( ! isLocked ) { Set attrValueSet = amIdentity . getAttribute ( USER_STATUS_ATTR ) ; if ( ( attrValueSet != null ) && ( ! attrValueSet . isEmpty ( ) ) ) { Iterator i = attrValueSet . iterator ( ) ; String attrValue = ( String ) i . next ( ) ; isLocked = attrValue . equals ( USER_INACTIVE ) ; } } } catch ( Exception e ) { debug . error ( "Error inactivating user account" , e ) ; } } if ( debug . messageEnabled ( ) ) { if ( isLocked ) { debug . message ( "Account is locked" ) ; } else { debug . message ( "Account is unlocked" ) ; } } return isLocked ; }
checks if user account has been unlocked . this method is only for accounts which are physically locked .
