diff options
Diffstat (limited to 'modules/user')
-rw-r--r-- | modules/user/user.admin.inc | 12 | ||||
-rw-r--r-- | modules/user/user.api.php | 2 | ||||
-rw-r--r-- | modules/user/user.module | 37 | ||||
-rw-r--r-- | modules/user/user.pages.inc | 2 | ||||
-rw-r--r-- | modules/user/user.test | 14 |
5 files changed, 29 insertions, 38 deletions
diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc index a71033bcb..6a05e6552 100644 --- a/modules/user/user.admin.inc +++ b/modules/user/user.admin.inc @@ -114,7 +114,7 @@ function user_filter_form_submit($form, &$form_state) { return; } - $form_state['redirect'] = 'admin/user/user'; + $form_state['redirect'] = 'admin/user'; return; } @@ -297,7 +297,7 @@ function user_admin_settings() { $form['registration_cancellation']['user_cancel_method'] = array( '#type' => 'item', '#title' => t('When cancelling a user account'), - '#description' => t('Users with the %select-cancel-method or %administer-users <a href="@permissions-url">permissions</a> can override this default method.', array('%select-cancel-method' => t('Select method for cancelling account'), '%administer-users' => t('Administer users'), '@permissions-url' => url('admin/user/permissions'))), + '#description' => t('Users with the %select-cancel-method or %administer-users <a href="@permissions-url">permissions</a> can override this default method.', array('%select-cancel-method' => t('Select method for cancelling account'), '%administer-users' => t('Administer users'), '@permissions-url' => url('admin/settings/permissions'))), ); $form['registration_cancellation']['user_cancel_method'] += user_cancel_methods(); foreach (element_children($form['registration_cancellation']['user_cancel_method']) as $element) { @@ -728,7 +728,7 @@ function user_admin_role() { $rid = arg(4); if ($rid) { if ($rid == DRUPAL_ANONYMOUS_RID || $rid == DRUPAL_AUTHENTICATED_RID) { - drupal_goto('admin/user/roles'); + drupal_goto('admin/settings/roles'); } // Display the edit role form. $role = db_query('SELECT * FROM {role} WHERE rid = :rid', array(':rid' => $rid))->fetchObject(); @@ -817,7 +817,7 @@ function user_admin_role_submit($form, &$form_state) { ->execute(); drupal_set_message(t('The role has been added.')); } - $form_state['redirect'] = 'admin/user/roles'; + $form_state['redirect'] = 'admin/settings/roles'; return; } @@ -874,9 +874,9 @@ function theme_user_admin_account($form) { function theme_user_admin_new_role($form) { $header = array(t('Name'), array('data' => t('Operations'), 'colspan' => 2)); foreach (user_roles() as $rid => $name) { - $edit_permissions = l(t('edit permissions'), 'admin/user/permissions/' . $rid); + $edit_permissions = l(t('edit permissions'), 'admin/settings/permissions/' . $rid); if (!in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) { - $rows[] = array($name, l(t('edit role'), 'admin/user/roles/edit/' . $rid), $edit_permissions); + $rows[] = array($name, l(t('edit role'), 'admin/settings/roles/edit/' . $rid), $edit_permissions); } else { $rows[] = array($name, t('locked'), $edit_permissions); diff --git a/modules/user/user.api.php b/modules/user/user.api.php index ff679ecdf..2030422ae 100644 --- a/modules/user/user.api.php +++ b/modules/user/user.api.php @@ -221,7 +221,7 @@ function hook_user_cancel_methods_alter(&$methods) { * Add mass user operations. * * This hook enables modules to inject custom operations into the mass operations - * dropdown found at admin/user/user, by associating a callback function with + * dropdown found at admin/user, by associating a callback function with * the operation, which is called when the form is submitted. The callback function * receives one initial argument, which is an array of the checked users. * 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 .= '<p>' . 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.') . '</p>'; $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@user">User module</a>.', array('@user' => 'http://drupal.org/handbook/modules/user/')) . '</p>'; return $output; - case 'admin/user/user/create': - case 'admin/user/user/account/create': + case 'admin/user/create': return '<p>' . t("This web page allows administrators to register new users. Users' e-mail addresses and usernames must be unique.") . '</p>'; - case 'admin/user/permissions': - return '<p>' . 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 <a href="@role">Roles</a> 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 <a href="@settings">User Settings</a> 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'))) . '</p>'; - case 'admin/user/roles': + case 'admin/settings/permissions': + return '<p>' . 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 <a href="@role">Roles</a> 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 <a href="@settings">User Settings</a> 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'))) . '</p>'; + case 'admin/settings/roles': return t('<p>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 <a href="@permissions">user permissions</a>. Examples of roles include: anonymous user, authenticated user, moderator, administrator and so on. In this area you will define the <em>role names</em> of the various roles. To delete a role choose "edit".</p><p>By default, Drupal comes with two user roles:</p> <ul> <li>Anonymous user: this role is used for users that don\'t have a user account or that are not authenticated.</li> <li>Authenticated user: this role is automatically granted to all logged in users.</li> - </ul>', array('@permissions' => url('admin/user/permissions'))); + </ul>', array('@permissions' => url('admin/settings/permissions'))); case 'admin/user/search': return '<p>' . 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".') . '</p>'; } @@ -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']); } diff --git a/modules/user/user.pages.inc b/modules/user/user.pages.inc index bfeea5778..31783cd0b 100644 --- a/modules/user/user.pages.inc +++ b/modules/user/user.pages.inc @@ -411,7 +411,7 @@ function user_cancel_confirm_form_submit($form, &$form_state) { user_cancel($form_state['values'], $account->uid, $form_state['values']['user_cancel_method']); if (!isset($_REQUEST['destination'])) { - $form_state['redirect'] = 'admin/user/user'; + $form_state['redirect'] = 'admin/user'; } } else { diff --git a/modules/user/user.test b/modules/user/user.test index fb9732f3a..bed823f9b 100644 --- a/modules/user/user.test +++ b/modules/user/user.test @@ -475,7 +475,7 @@ class UserCancelTestCase extends DrupalWebTestCase { $edit['accounts[' . $uid . ']'] = TRUE; } $edit['accounts[' . $admin_user->uid . ']'] = TRUE; - $this->drupalPost('admin/user/user', $edit, t('Update')); + $this->drupalPost('admin/user', $edit, t('Update')); $this->assertText(t('Are you sure you want to cancel these user accounts?'), t('Confirmation form to cancel accounts displayed.')); $this->assertText(t('When cancelling these accounts'), t('Allows to select account cancellation method.')); $this->assertText(t('Require e-mail confirmation to cancel account.'), t('Allows to send confirmation mail.')); @@ -753,7 +753,7 @@ class UserPermissionsTestCase extends DrupalWebTestCase { $this->assertFalse(user_access('administer nodes', $account, TRUE), t('User does not have "administer nodes" permission.')); $edit = array(); $edit[$rid . '[administer nodes]'] = TRUE; - $this->drupalPost('admin/user/permissions', $edit, t('Save permissions')); + $this->drupalPost('admin/settings/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), t('Successful save message displayed.')); $this->assertTrue(user_access('administer nodes', $account, TRUE), t('User now has "administer nodes" permission.')); @@ -761,7 +761,7 @@ class UserPermissionsTestCase extends DrupalWebTestCase { $this->assertTrue(user_access('access user profiles', $account, TRUE), t('User has "access user profiles" permission.')); $edit = array(); $edit[$rid . '[access user profiles]'] = FALSE; - $this->drupalPost('admin/user/permissions', $edit, t('Save permissions')); + $this->drupalPost('admin/settings/permissions', $edit, t('Save permissions')); $this->assertText(t('The changes have been saved.'), t('Successful save message displayed.')); $this->assertFalse(user_access('access user profiles', $account, TRUE), t('User no longer has "access user profiles" permission.')); } @@ -809,7 +809,7 @@ class UserAdminTestCase extends DrupalWebTestCase { // Create admin user to delete registered user. $admin_user = $this->drupalCreateUser(array('administer users')); $this->drupalLogin($admin_user); - $this->drupalGet('admin/user/user'); + $this->drupalGet('admin/user'); $this->assertText($user_a->name, t('Found user A on admin users page')); $this->assertText($user_b->name, t('Found user B on admin users page')); $this->assertText($user_c->name, t('Found user C on admin users page')); @@ -819,7 +819,7 @@ class UserAdminTestCase extends DrupalWebTestCase { $edit = array(); $edit['filter'] = 'permission'; $edit['permission'] = 'administer taxonomy'; - $this->drupalPost('admin/user/user', $edit, t('Filter')); + $this->drupalPost('admin/user', $edit, t('Filter')); // Check if the correct users show up. $this->assertNoText($user_a->name, t('User A not on filtered by perm admin users page')); @@ -832,7 +832,7 @@ class UserAdminTestCase extends DrupalWebTestCase { $edit = array(); $edit['operation'] = 'block'; $edit['accounts[' . $account->uid . ']'] = TRUE; - $this->drupalPost('admin/user/user', $edit, t('Update')); + $this->drupalPost('admin/user', $edit, t('Update')); $account = user_load($user_b->uid, TRUE); $this->assertEqual($account->status, 0, 'User B blocked'); } @@ -961,7 +961,7 @@ class UserBlocksUnitTests extends DrupalWebTestCase { $edit = array(); $edit['name'] = $user->name; $edit['pass'] = $user->pass_raw; - $this->drupalPost('admin/user/permissions', $edit, t('Log in')); + $this->drupalPost('admin/settings/permissions', $edit, t('Log in')); $this->assertText(t('Log out'), t('Logged in.')); // Check that we are still on the same page. |