1 user.module | user_menu_alter(&$items) |
Implements hook_menu_alter().
File
- core/
modules/ user/ user.module, line 1709 - Enables the user registration and login system.
Code
function user_menu_alter(&$items) {
// Add an icon to the Views-provided menu item.
if (isset($items['admin/people'])) {
$items['admin/people']['icon'] = 'users-fill';
}
if (module_exists('field_ui')) {
// Provide a parent menu item for managing fields.
$items['admin/config/people/manage'] = $items['admin/config/people/manage/fields'];
$items['admin/config/people/manage']['type'] = MENU_NORMAL_ITEM;
$items['admin/config/people/manage']['weight'] = 1;
$items['admin/config/people/manage']['description'] = 'Configure fields and display of fields on user accounts.';
// Set "Manage fields" tab as the default tab.
$items['admin/config/people/manage/fields']['type'] = MENU_DEFAULT_LOCAL_TASK;
}
// If we are using the simplified look for login pages, suppress the layout by
// providing a delivery_callback value. See menu_execute_active_handler().
// Note this only applies to non-wildcard paths. If a module provides a login
// page that uses a wildcard in its path, it will also need to make this
// change to fully support the simplified page layout.
if (config_get('system.core', 'user_login_appearance') == 'simplified') {
$login_paths = user_get_user_login_paths();
foreach ($login_paths['login'] as $login_path) {
if (isset($items[$login_path]) && user_is_login_path($login_path)) {
$items[$login_path]['delivery callback'] = 'backdrop_deliver_html_page';
}
}
}
}