function userprotect_menu_alter in User protect 6
Same name and namespace in other branches
- 7 userprotect.module \userprotect_menu_alter()
Implementation of 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/delete, and replace user modules's default access checks.
File
- ./
userprotect.module, line 391
Code
function userprotect_menu_alter(&$callbacks) {
$callbacks['user/%user_category/edit']['access callback'] = 'userprotect_user_edit_access';
$callbacks['user/%user_category/edit']['access arguments'] = array(
1,
);
$callbacks['user/%user/delete']['access callback'] = 'userprotect_user_delete_access';
$callbacks['user/%user/delete']['access arguments'] = array(
1,
);
}