function login_destination_menu_link_alter in Login Destination 7
Implements hook_menu_link_alter().
File
- ./
login_destination.module, line 233 - Control where users are directed to, once they login
Code
function login_destination_menu_link_alter(&$item) {
// Flag a link to be altered by hook_translated_menu_link_alter().
// This is called only on menu rebuild, so we have to add this information
// manually to the database on install. Clearing caches also helps.
$paths = array(
'user/logout',
'user/login',
'user',
);
if (in_array($item['link_path'], $paths)) {
$item['options']['alter'] = TRUE;
}
}