You are here

function userprotect_menu_alter in User protect 7

Same name and namespace in other branches
  1. 6 userprotect.module \userprotect_menu_alter()

Implements hook_menu_alter().

Since we also have to guard against menu items being called directly from a URL, this page check is necessary. The checks are invoked for user/x/edit and user/x/cancel, and replace user modules's default access checks.

File

./userprotect.module, line 371
Main module file for the userprotect module.

Code

function userprotect_menu_alter(&$callbacks) {
  $callbacks['user/%user/edit']['access callback'] = 'userprotect_user_edit_access';
  $callbacks['user/%user/cancel']['access callback'] = 'userprotect_user_cancel_access';
}