You are here

function masquerade_switch_user_page in Masquerade 6

Same name and namespace in other branches
  1. 7 masquerade.module \masquerade_switch_user_page()

Page callback to switch users.

2 string references to 'masquerade_switch_user_page'
masquerade_menu in ./masquerade.module
Implementation of hook_menu().
masquerade_translated_menu_link_alter in ./masquerade.module
Implementation of hook_translated_menu_link_alter().

File

./masquerade.module, line 649
masquerade.module

Code

function masquerade_switch_user_page($uid) {
  if (isset($_GET['token']) && drupal_valid_token($_GET['token'], 'masquerade/switch/' . $uid) && masquerade_switch_user($uid)) {
    drupal_goto(referer_uri());
  }
  else {
    drupal_access_denied();
  }
}