Sometimes, we need to restrict a user from accessing a certain page.
You can do it through: hook_menu_alter()
So, if your module name is hello_world, the function should be:
You can do it through: hook_menu_alter()
So, if your module name is hello_world, the function should be:
function hello_world_menu_alter(&$items) {
$items['user/%/edit']['access callback'] = FALSE;
}
Here, we have restricted user from editing profile.