You are here

function masquerade_ctools_is_masquerading_access_check in Masquerade Extras 6

Same name and namespace in other branches
  1. 7 masquerade_ctools/plugins/access/is_masquerading.inc \masquerade_ctools_is_masquerading_access_check()

Checks if the user is currently masquerading as another. If no context is provided, this will automatically return FALSE.

Return value

TRUE if the current user is masquerading, FALSE otherwise.

1 string reference to 'masquerade_ctools_is_masquerading_access_check'
is_masquerading.inc in masquerade_ctools/plugins/access/is_masquerading.inc

File

masquerade_ctools/plugins/access/is_masquerading.inc, line 21

Code

function masquerade_ctools_is_masquerading_access_check($conf, $context) {
  if (isset($_SESSION['masquerading']) && is_numeric($_SESSION['masquerading'])) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}