You are here

function masquerade_context_condition::execute in Masquerade Extras 6.2

Same name and namespace in other branches
  1. 7.2 masquerade_context/plugins/condition/masquerade_context.inc \masquerade_context_condition::execute()
  2. 7 masquerade_context/plugins/condition/masquerade_context.inc \masquerade_context_condition::execute()

Evalutes this context condition.

Parameters

stdClass $account: The user account to evaluate.

File

masquerade_context/plugins/condition/masquerade_context.inc, line 49
Expose masquerade as a customizable context condition.

Class

masquerade_context_condition
@file Expose masquerade as a customizable context condition.

Code

function execute($account) {

  // Skip processing if no contexts use this condition.
  // @see context_condition::condition_used()
  if (!$this
    ->condition_used()) {
    return;
  }

  // Evaluate if the user is masquerading.
  $this
    ->execute_is_masquerading($account);

  // Evaluate if the user is being masqueraded by someone else.
  $this
    ->execute_is_being_masqueraded($account);
}