protected function hasGroupWithAttributeValue(LdapObjectCollection $groups, $attribute, $value)
    {
        $value = strtolower($value);

        /** @var \LdapTools\Object\LdapObject $group */
        foreach ($groups as $group) {
            if ($group->has($attribute) && strtolower($group->get($attribute)) === $value) {
                return true;
            }
        }

        return false;
    }
protected function hasGroupWithAttributeValue(LdapObjectCollection $groups, $attribute, $value)
    {
        $value = strtolower($value);

        /** @var \LdapTools\Object\LdapObject $group */
        foreach ($groups as $group) {
            if ($group->has($attribute) && strtolower($group->get($attribute)) === $value) {
                return true;
            }
        }

        return false;
    }
protected function hasGroupWithAttributeValue ( LdapObjectCollection $ groups , $ attribute , $ value ) { $ value = strtolower ( $ value ) ; /** @var \LdapTools\Object\LdapObject $group */ foreach ( $ groups as $ group ) { if ( $ group -> has ( $ attribute ) && strtolower ( $ group -> get ( $ attribute ) ) === $ value ) { return true ; } } return false ; }
Check each LDAP group to see if any of them have an attribute with a specific value.

@param LdapObjectCollection $groups
@param string $attribute
@param string $value
@return bool
Check each LDAP group to see if any of them have an attribute with a specific value .