You are here

function masquerade_is_masquerading_context_condition::execute in Masquerade Extras 6

Evaluates the condition.

File

masquerade_context/plugins/condition/masquerade_is_masquerading.inc, line 18
Expose current user role as a context condition.

Class

masquerade_is_masquerading_context_condition
@file Expose current user role as a context condition.

Code

function execute() {
  if (isset($_SESSION['masquerading']) && is_numeric($_SESSION['masquerading'])) {
    foreach ($this
      ->get_contexts() as $context) {
      $this
        ->condition_met($context, 'is_masquerading');
    }
  }
}