You are here

function masquerade_context_condition::is_being_masqueraded 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::is_being_masqueraded()
  2. 7 masquerade_context/plugins/condition/masquerade_context.inc \masquerade_context_condition::is_being_masqueraded()

Evaluates if the account is being masqueraded by someone else.

@returns TRUE if someone else is posing as account. FALSE otherwise. @retval bool

Parameters

stdClass $account: The user account to evaluate.

1 call to masquerade_context_condition::is_being_masqueraded()
masquerade_context_condition::execute_is_being_masqueraded in masquerade_context/plugins/condition/masquerade_context.inc
Evaluates if someone is posing as the account.

File

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

Class

masquerade_context_condition
@file Expose masquerade as a customizable context condition.

Code

function is_being_masqueraded($account) {
  $query_is_being_masqueraded = db_query("SELECT uid_from\n         FROM {masquerade}\n        WHERE uid_as = %d\n        LIMIT 1", $account->uid);
  return (bool) db_result($query_is_being_masqueraded);
}