You are here

function cas_translated_menu_link_alter in CAS 6.3

Same name and namespace in other branches
  1. 7 cas.module \cas_translated_menu_link_alter()

Implements hook_translated_menu_item_alter().

Append dynamic query 'destination' to several menu items.

File

./cas.module, line 399
Enables users to authenticate via a Central Authentication Service (CAS) Cas will currently work if the auto registration is turned on and will create user accounts automatically.

Code

function cas_translated_menu_link_alter(&$item, $map) {
  if ($item['href'] == 'cas') {
    $item['localized_options']['query'] = drupal_get_destination();
  }
  elseif ($item['href'] == 'caslogout' && !variable_get('cas_logout_destination', '')) {
    $item['localized_options']['query'] = drupal_get_destination();
  }
}