You are here

public function FacetapiDependencyRole::execute in Facet API 7

Same name and namespace in other branches
  1. 6.3 plugins/facetapi/dependency_role.inc \FacetapiDependencyRole::execute()
  2. 7.2 plugins/facetapi/dependency_role.inc \FacetapiDependencyRole::execute()

Implements FacetapiDependency::execute().

Overrides FacetapiDependency::execute

File

plugins/facetapi/dependency_role.inc, line 21
The role dependency class.

Class

FacetapiDependencyRole
Dependency plugin adding the user role conditions.

Code

public function execute() {
  global $user;
  if (1 != $user->uid) {
    $roles = array_filter($this->settings['roles']);
    if ($roles && !array_intersect_key($user->roles, $roles)) {
      return FALSE;
    }
  }
}