function user_permission in Drupal 7
Implements hook_permission().
File
- modules/
user/ user.module, line 872 - Enables the user registration and login system.
Code
function user_permission() {
return array(
'administer permissions' => array(
'title' => t('Administer permissions'),
'restrict access' => TRUE,
),
'administer users' => array(
'title' => t('Administer users'),
'restrict access' => TRUE,
),
'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' => variable_get('anonymous', t('Anonymous')),
'@user-settings-url' => url('admin/config/people/accounts'),
)),
),
'select account cancellation method' => array(
'title' => t('Select method for cancelling own account'),
'restrict access' => TRUE,
),
);
}