You are here

function _devel_switch_user_access in Devel 7

Same name and namespace in other branches
  1. 6 devel.module \_devel_switch_user_access()

Menu item access callback: checks permission and token for Switch User.

1 string reference to '_devel_switch_user_access'
devel_menu in ./devel.module
Implements hook_menu().

File

./devel.module, line 327
This module holds functions useful for Drupal development.

Code

function _devel_switch_user_access($name) {

  // Suppress notices when on other pages when menu system still checks access.
  return user_access('switch users') && drupal_valid_token(@$_GET['token'], "devel/switch/{$name}", TRUE);
}