lib/cratus/user.rb
def unlock
      if locked? && enabled?
        Cratus::LDAP.replace_attribute(
          dn,
          Cratus.config.user_lockout_attribute,
          ['0']
        )
        refresh
      elsif disabled?
        false
      else
        true
      end
    end
def unlock
      if locked? && enabled?
        Cratus::LDAP.replace_attribute(
          dn,
          Cratus.config.user_lockout_attribute,
          ['0']
        )
        refresh
      elsif disabled?
        false
      else
        true
      end
    end
def unlock if locked? && enabled? Cratus :: LDAP . replace_attribute ( dn , Cratus . config . user_lockout_attribute , [ '0' ] ) refresh elsif disabled? false else true end end
Unlocks a user
 @return `true` on success (or if user is already unlocked)
 @return `false` when the account is disabled (unlocking not permitted)
Unlocks a user