function user_ingroup($username,$group,$recursive=NULL){
        if ($username==NULL){ return (false); }
        if ($group==NULL){ return (false); }
        if (!$this->_bind){ return (false); }
        if ($recursive==NULL){ $recursive=$this->_recursive_groups; } //use the default option if they haven't set it
        
        //get a list of the groups
        $groups=$this->user_groups($username,array($this->_group_attribute),$recursive);
        
        //return true if the specified group is in the group list
        if (in_array($group,$groups)){ return (true); }

        return (false);
    }
function user_ingroup($username,$group,$recursive=NULL){
        if ($username==NULL){ return (false); }
        if ($group==NULL){ return (false); }
        if (!$this->_bind){ return (false); }
        if ($recursive==NULL){ $recursive=$this->_recursive_groups; } //use the default option if they haven't set it
        
        //get a list of the groups
        $groups=$this->user_groups($username,array($this->_group_attribute),$recursive);
        
        //return true if the specified group is in the group list
        if (in_array($group,$groups)){ return (true); }

        return (false);
    }
function user_ingroup ( $ username , $ group , $ recursive = NULL ) { if ( $ username == NULL ) { return ( false ) ; } if ( $ group == NULL ) { return ( false ) ; } if ( ! $ this -> _bind ) { return ( false ) ; } if ( $ recursive == NULL ) { $ recursive = $ this -> _recursive_groups ; } //use the default option if they haven't set it //get a list of the groups $ groups = $ this -> user_groups ( $ username , array ( $ this -> _group_attribute ) , $ recursive ) ; //return true if the specified group is in the group list if ( in_array ( $ group , $ groups ) ) { return ( true ) ; } return ( false ) ; }
Returns true if the user is a member of the group
Returns true if the user is a member of the group