You are here

public function HttpResponseHeadersRule::rolesExist in HTTP Response Headers 7

Checks the roles against given $user_roles.

Parameters

array $user_roles: An array of user role IDs.

Return value

bool TRUE if exist, FALSE otherwise.

File

includes/http_response_headers.rule.inc, line 364
Class definitions for the HTTP response headers rule.

Class

HttpResponseHeadersRule
Defines HttpResponseHeadersRule

Code

public function rolesExist(array $user_roles) {
  return !array_intersect(explode(',', $this->roles), array_keys($user_roles));
}