function masquerade_init

7.x masquerade.module masquerade_init()
6.x masquerade.module masquerade_init()

File

modules/masquerade/masquerade.module, line 89
The masquerade module, which allows admin users to impersonate other users.

Code

function masquerade_init() {
  global $user;

  if (isset($_SESSION ["masquerade_active"]) && $_SESSION ["masquerade_active"]) {
    fp_add_message(t("You are currently masquerading as %user (originally %ou).  To return to your previous
                      account, log out, then log in normally.", 
    array("%user" => $user->name, "%ou" => $_SESSION ["masquerade_original_user"]->name)), 
    "status", TRUE);

  }
}