diff options
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 75 |
1 files changed, 41 insertions, 34 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 01f2d3ff2..37b5a039a 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -30,19 +30,19 @@ function user_help($path, $arg) { $output .= '<h3>' . t('Uses') . '</h3>'; $output .= '<dl>'; $output .= '<dt>' . t('Creating and managing users') . '</dt>'; - $output .= '<dd>' . t('The User module allows users with the appropriate <a href="@permissions">permissions</a> to create user accounts through the <a href="@people">People administration page</a>, where they can also assign users to one or more roles, and block or delete user accounts. If allowed, users without accounts (anonymous users) can create their own accounts on the <a href="@register">Create new account</a> page.', array('@permissions' => url('admin/config/people/permissions', array('fragment' => 'module-user')), '@people' => url('admin/people'), '@register' => url('user/register'))) . '</dd>'; + $output .= '<dd>' . t('The User module allows users with the appropriate <a href="@permissions">permissions</a> to create user accounts through the <a href="@people">People administration page</a>, where they can also assign users to one or more roles, and block or delete user accounts. If allowed, users without accounts (anonymous users) can create their own accounts on the <a href="@register">Create new account</a> page.', array('@permissions' => url('admin/people/permissions', array('fragment' => 'module-user')), '@people' => url('admin/people'), '@register' => url('user/register'))) . '</dd>'; $output .= '<dt>' . t('User roles and permissions') . '</dt>'; - $output .= '<dd>' . t('<em>Roles</em> are used to group and classify users; each user can be assigned one or more roles. By default there are two roles: <em>anonymous user</em> (users that are not logged in) and <em>authenticated user</em> (users that are registered and logged in). Depending on choices you made when you installed Drupal, the installation process may have defined more roles, and you can create additional custom roles on the <a href="@roles">Roles page</a>. After creating roles, you can set permissions for each role on the <a href="@permissions_user">Permissions page</a>. Granting a permission allows users who have been assigned a particular role to perform an action on the site, such as viewing a particular type of content, editing or creating content, administering settings for a particular module, or using a particular function of the site (such as search).', array('@permissions_user' => url('admin/config/people/permissions'), '@roles' => url('admin/config/people/roles'))) . '</dd>'; + $output .= '<dd>' . t('<em>Roles</em> are used to group and classify users; each user can be assigned one or more roles. By default there are two roles: <em>anonymous user</em> (users that are not logged in) and <em>authenticated user</em> (users that are registered and logged in). Depending on choices you made when you installed Drupal, the installation process may have defined more roles, and you can create additional custom roles on the <a href="@roles">Roles page</a>. After creating roles, you can set permissions for each role on the <a href="@permissions_user">Permissions page</a>. Granting a permission allows users who have been assigned a particular role to perform an action on the site, such as viewing a particular type of content, editing or creating content, administering settings for a particular module, or using a particular function of the site (such as search).', array('@permissions_user' => url('admin/config/people/permissions'), '@roles' => url('admin/people/roles'))) . '</dd>'; $output .= '<dt>' . t('Account settings') . '</dt>'; - $output .= '<dd>' . t('The <a href="@accounts">Account settings page</a> allows you to manage settings for the displayed name of the anonymous user role, personal contact forms, user registration, and account cancellation. On this page you can also manage settings for account personalization (including signatures and user pictures), and adapt the text for the e-mail messages that are sent automatically during the user registration process.', array('@accounts' => url('admin/config/people/accounts'))) . '</dd>'; + $output .= '<dd>' . t('The <a href="@accounts">Account settings page</a> allows you to manage settings for the displayed name of the anonymous user role, personal contact forms, user registration, and account cancellation. On this page you can also manage settings for account personalization (including signatures and user pictures), and adapt the text for the e-mail messages that are sent automatically during the user registration process.', array('@accounts' => url('admin/people/accounts'))) . '</dd>'; $output .= '</dl>'; return $output; case 'admin/people/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/config/people/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/config/people/roles'), '@settings' => url('admin/config/people/accounts'))) . '</p>'; - case 'admin/config/people/roles': - $output = '<p>' . 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 <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".', array('@permissions' => url('admin/config/people/permissions'))) . '</p>'; + case 'admin/people/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/people/permissions/roles'), '@settings' => url('admin/config/people/accounts'))) . '</p>'; + case 'admin/people/permissions/roles': + $output = '<p>' . 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 <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".', array('@permissions' => url('admin/people/permissions'))) . '</p>'; $output .= '<p>'. t('By default, Drupal comes with two user roles:') . '</p>'; $output .= '<ul>'; $output .= '<li>' . t("Anonymous user: this role is used for users that don't have a user account or that are not authenticated.") . '</li>'; @@ -1480,6 +1480,39 @@ function user_menu() { 'weight' => -10, 'file' => 'user.admin.inc', ); + $items['admin/people/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'), + 'file' => 'user.admin.inc', + 'type' => MENU_LOCAL_TASK, + ); + $items['admin/people/permissions/list'] = array( + 'title' => 'Permissions', + 'description' => 'Determine access to features by selecting permissions for roles.', + 'type' => MENU_DEFAULT_LOCAL_TASK, + 'weight' => -8, + ); + $items['admin/people/permissions/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'), + 'file' => 'user.admin.inc', + 'type' => MENU_LOCAL_TASK, + 'weight' => -5, + ); + $items['admin/people/permissions/roles/edit'] = array( + 'title' => 'Edit role', + 'page arguments' => array('user_admin_role'), + 'access arguments' => array('administer permissions'), + 'type' => MENU_CALLBACK, + ); + + $items['admin/people/create'] = array( 'title' => 'Add user', 'page arguments' => array('create'), @@ -1489,7 +1522,7 @@ function user_menu() { // Administration pages. $items['admin/config/people'] = array( - 'title' => 'People and permissions', + 'title' => 'People', 'description' => 'Configure user accounts, roles and permissions.', 'position' => 'right', 'page callback' => 'system_admin_menu_block_page', @@ -1512,32 +1545,6 @@ function user_menu() { 'weight' => -10, ); - // Permission administration pages. - $items['admin/config/people/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'), - 'file' => 'user.admin.inc', - 'weight' => -9, - ); - $items['admin/config/people/roles/edit'] = array( - 'title' => 'Edit role', - 'page arguments' => array('user_admin_role'), - 'access arguments' => array('administer permissions'), - 'type' => MENU_CALLBACK, - ); - $items['admin/config/people/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'), - 'file' => 'user.admin.inc', - 'weight' => -8, - ); - // Use %user_uid_only_optional here to avoid loading the full user for // basic access checks. $items['user/%user_uid_only_optional'] = array( |