protected function is_user_suspended($user) {
        if (!$this->config->suspended_attribute || !isset($user->suspended)) {
            return false;
        }
        if ($this->config->suspended_attribute == 'useraccountcontrol' && $this->config->user_type == 'ad') {
            return (bool)($user->suspended & AUTH_AD_ACCOUNTDISABLE);
        }

        return (bool)$user->suspended;
    }
protected function is_user_suspended($user) {
        if (!$this->config->suspended_attribute || !isset($user->suspended)) {
            return false;
        }
        if ($this->config->suspended_attribute == 'useraccountcontrol' && $this->config->user_type == 'ad') {
            return (bool)($user->suspended & AUTH_AD_ACCOUNTDISABLE);
        }

        return (bool)$user->suspended;
    }
protected function is_user_suspended ( $ user ) { if ( ! $ this -> config -> suspended_attribute || ! isset ( $ user -> suspended ) ) { return false ; } if ( $ this -> config -> suspended_attribute == 'useraccountcontrol' && $ this -> config -> user_type == 'ad' ) { return ( bool ) ( $ user -> suspended & AUTH_AD_ACCOUNTDISABLE ) ; } return ( bool ) $ user -> suspended ; }
Check if a user is suspended. This function is intended to be used after calling
get_userinfo_asobj. This is needed because LDAP doesn't have a notion of disabled
users, however things like MS Active Directory support it and expose information
through a field.

@param object $user the user object returned by get_userinfo_asobj
@return boolean
Check if a user is suspended . This function is intended to be used after calling get_userinfo_asobj . This is needed because LDAP doesn t have a notion of disabled users however things like MS Active Directory support it and expose information through a field .