public function groupIsMember($group_dn, $user, $nested = NULL) {

    $nested = ($nested === TRUE || $nested === FALSE) ? $nested : $this->groupNested;
    $group_dns = $this->groupMembershipsFromUser($user, 'group_dns', $nested);
    // while list of group dns is going to be in correct mixed case, $group_dn may not since it may be derived from user entered values
    // so make sure in_array() is case insensitive
    return (is_array($group_dns) && in_array(drupal_strtolower($group_dn), $this->dnArrayToLowerCase($group_dns)));
  }
public function groupIsMember($group_dn, $user, $nested = NULL) {

    $nested = ($nested === TRUE || $nested === FALSE) ? $nested : $this->groupNested;
    $group_dns = $this->groupMembershipsFromUser($user, 'group_dns', $nested);
    // while list of group dns is going to be in correct mixed case, $group_dn may not since it may be derived from user entered values
    // so make sure in_array() is case insensitive
    return (is_array($group_dns) && in_array(drupal_strtolower($group_dn), $this->dnArrayToLowerCase($group_dns)));
  }
public function groupIsMember ( $ group_dn , $ user , $ nested = NULL ) { $ nested = ( $ nested === TRUE || $ nested === FALSE ) ? $ nested : $ this -> groupNested ; $ group_dns = $ this -> groupMembershipsFromUser ( $ user , 'group_dns' , $ nested ) ; // while list of group dns is going to be in correct mixed case, $group_dn may not since it may be derived from user entered values // so make sure in_array() is case insensitive return ( is_array ( $ group_dns ) && in_array ( drupal_strtolower ( $ group_dn ) , $ this -> dnArrayToLowerCase ( $ group_dns ) ) ) ; }
Is a user a member of group?

@param string $group_dn MIXED CASE
@param mixed $user
- drupal user object (stdClass Object)
- ldap entry of user (array)
- ldap dn of user (array)
- drupal user name (string)
@param enum $nested = NULL (default to server configuration), TRUE, or FALSE indicating to test for nested groups
Is a user a member of group?