function masquerade_switch_user_page in Masquerade 7
Same name and namespace in other branches
- 6 masquerade.module \masquerade_switch_user_page()
Page callback to switch users.
2 string references to 'masquerade_switch_user_page'
- masquerade_menu in ./
masquerade.module - Implements hook_menu().
- masquerade_translated_menu_link_alter in ./
masquerade.module - Implements hook_translated_menu_link_alter().
File
- ./
masquerade.module, line 793 - The masquerade module allows administrators to masquerade as other user.
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($_SERVER['HTTP_REFERER']);
}
else {
drupal_access_denied();
}
}