1 user.module | user_permission() |
Implements hook_permission().
File
- core/
modules/ user/ user.module, line 587 - Enables the user registration and login system.
Code
function user_permission() {
return array(
'administer permissions' => array(
'title' => t('Administer permissions'),
'restrict access' => TRUE,
'warning' => t('Grant any permission to any user role.'),
),
'administer users' => array(
'title' => t('Administer user accounts'),
'restrict access' => TRUE,
'warning' => t('Create, edit and delete user accounts.'),
),
'assign roles' => array(
'title' => t('Assign user roles'),
'restrict access' => TRUE,
'warning' => t('Assign any user role to any user account.'),
),
'administer account settings' => array(
'title' => t('Administer user account settings'),
'description' => t('Manage settings that apply to all user accounts.'),
'restrict access' => TRUE,
'warning' => t('Change the way user account registrations work, potentially avoiding administrator approval.'),
),
'access user profiles' => array(
'title' => t('View user profiles'),
),
'change own username' => array(
'title' => t('Change own username'),
),
'cancel account' => array(
'title' => t('Cancel own user account'),
'description' => t('Note: content may be kept, unpublished, deleted or transferred to the %anonymous-name user depending on the configured <a href="@user-settings-url">user settings</a>.', array('%anonymous-name' => config_get_translated('system.core', 'anonymous'), '@user-settings-url' => url('admin/config/people/settings'))),
),
'select account cancellation method' => array(
'title' => t('Select method for cancelling own account'),
'restrict access' => TRUE,
'warning' => t('Allows people to choose to permanently delete their user account and all content created by them (potential for irreversible data loss).'),
),
);
}