From d4228535043619ada5192001acde645238660b37 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 31 Jul 2009 19:01:03 +0000 Subject: =?UTF-8?q?-=20Patch=20#536570=20by=20G=C3=A1bor=20Hojtsy:=20imple?= =?UTF-8?q?mented=20new=20IA=20for=20top-level=20users.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/user/user.module | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index 4a103fcb2..5caa06db4 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1315,26 +1315,18 @@ function user_menu() { // User administration pages. $items['admin/user'] = array( - 'title' => 'User management', - 'description' => "Manage your site's users, groups and access to site features.", - 'position' => 'left', - 'page callback' => 'system_admin_menu_block_page', - 'access callback' => 'system_admin_menu_block_access', - 'access arguments' => array('admin/user', 'access administration pages'), - ); - $items['admin/user/user'] = array( 'title' => 'Users', - 'description' => 'List, add, and edit users.', 'page callback' => 'user_admin', 'page arguments' => array('list'), 'access arguments' => array('administer users'), + 'weight' => -4, ); - $items['admin/user/user/list'] = array( + $items['admin/user/list'] = array( 'title' => 'List', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, ); - $items['admin/user/user/create'] = array( + $items['admin/user/create'] = array( 'title' => 'Add user', 'page arguments' => array('create'), 'access arguments' => array('administer users'), @@ -1349,21 +1341,21 @@ function user_menu() { ); // Permission administration pages. - $items['admin/user/permissions'] = array( + $items['admin/settings/permissions'] = array( 'title' => 'Permissions', 'description' => 'Determine access to features by selecting permissions for roles.', 'page callback' => 'drupal_get_form', 'page arguments' => array('user_admin_permissions'), 'access arguments' => array('administer permissions'), ); - $items['admin/user/roles'] = array( + $items['admin/settings/roles'] = array( 'title' => 'Roles', 'description' => 'List, edit, or add user roles.', 'page callback' => 'drupal_get_form', 'page arguments' => array('user_admin_new_role'), 'access arguments' => array('administer permissions'), ); - $items['admin/user/roles/edit'] = array( + $items['admin/settings/roles/edit'] = array( 'title' => 'Edit role', 'page arguments' => array('user_admin_role'), 'access arguments' => array('administer permissions'), @@ -2320,7 +2312,7 @@ function user_multiple_cancel_confirm(&$form_state) { return confirm_form($form, t('Are you sure you want to cancel these user accounts?'), - 'admin/user/user', t('This action cannot be undone.'), + 'admin/user', t('This action cannot be undone.'), t('Cancel accounts'), t('Cancel')); } @@ -2347,7 +2339,7 @@ function user_multiple_cancel_confirm_submit($form, &$form_state) { } } } - $form_state['redirect'] = 'admin/user/user'; + $form_state['redirect'] = 'admin/user'; return; } @@ -2364,17 +2356,16 @@ function user_help($path, $arg) { $output .= '

' . t('A visitor accessing your website is assigned a unique ID, or session ID, which is stored in a cookie. The cookie does not contain personal information, but acts as a key to retrieve information from your site. Users should have cookies enabled in their web browser when using your site.') . '

'; $output .= '

' . t('For more information, see the online handbook entry for User module.', array('@user' => 'http://drupal.org/handbook/modules/user/')) . '

'; return $output; - case 'admin/user/user/create': - case 'admin/user/user/account/create': + case 'admin/user/create': return '

' . t("This web page allows administrators to register new users. Users' e-mail addresses and usernames must be unique.") . '

'; - case 'admin/user/permissions': - return '

' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the Roles page to create a role). Two important roles to consider are Authenticated Users and Administrators. Any permissions granted to the Authenticated Users role will be given to any user who can log into your site. You can make any role the Administrator role for the site, meaning this will be granted all new permissions automatically. You can do this on the User Settings page. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array('@role' => url('admin/user/roles'), '@settings' => url('admin/settings/user'))) . '

'; - case 'admin/user/roles': + case 'admin/settings/permissions': + return '

' . t('Permissions let you control what users can do and see on your site. You can define a specific set of permissions for each role. (See the Roles page to create a role). Two important roles to consider are Authenticated Users and Administrators. Any permissions granted to the Authenticated Users role will be given to any user who can log into your site. You can make any role the Administrator role for the site, meaning this will be granted all new permissions automatically. You can do this on the User Settings page. You should be careful to ensure that only trusted users are given this access and level of control of your site.', array('@role' => url('admin/settings/roles'), '@settings' => url('admin/settings/user'))) . '

'; + case 'admin/settings/roles': return t('

Roles allow you to fine tune the security and administration of Drupal. A role defines a group of users that have certain privileges as defined in user permissions. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the role names of the various roles. To delete a role choose "edit".

By default, Drupal comes with two user roles:

', array('@permissions' => url('admin/user/permissions'))); + ', array('@permissions' => url('admin/settings/permissions'))); case 'admin/user/search': return '

' . t('Enter a simple pattern ("*" may be used as a wildcard match) to search for a username or e-mail address. For example, one may search for "br" and Drupal might return "brian", "brad", and "brenda@example.com".') . '

'; } @@ -2874,7 +2865,7 @@ function user_register() { '#title' => t('Notify user of new account') ); // Redirect back to page which initiated the create request; - // usually admin/user/user/create. + // usually admin/user/create. $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']); } -- cgit v1.2.3