function ldap_authentication_menu_alter in Lightweight Directory Access Protocol (LDAP) 7
Same name and namespace in other branches
- 8.2 ldap_authentication/ldap_authentication.module \ldap_authentication_menu_alter()
- 7.2 ldap_authentication/ldap_authentication.module \ldap_authentication_menu_alter()
Implements hook_menu_alter(). since menu items are cached, only useful to add or alter callbacks for ldap authentication driven menu items.
File
- ldap_authentication/
ldap_authentication.module, line 78 - This module injects itself into Drupal's Authentication stack.
Code
function ldap_authentication_menu_alter(&$items) {
ldap_server_module_load_include('inc', 'ldap_authentication', 'ldap_authentication');
$items['user/password']['access callback'] = 'ldap_authentication_show_reset_pwd';
$auth_conf = ldap_authentication_get_valid_conf();
if (@$auth_conf->ldapUserHelpLinkUrl) {
$items['user/ldaphelp'] = array(
'title' => $auth_conf->ldapUserHelpLinkText,
'page callback' => 'drupal_goto',
'page arguments' => array(
$auth_conf->ldapUserHelpLinkUrl,
),
'access callback' => 'ldap_authentication_show_ldap_help_link',
'type' => MENU_LOCAL_TASK,
);
}
}