user_settings_access.module in User Settings Access 6
File
user_settings_access.module
View source
<?php
function user_settings_access_menu() {
$items['admin/user/settings'] = array(
'title' => 'User settings',
'description' => 'Configure default behavior of users, including registration requirements, e-mails, and user pictures.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'user_admin_settings',
),
'access arguments' => array(
'User Settings',
),
'file' => 'user.admin.inc',
'file path' => drupal_get_path('module', 'user'),
);
return $items;
}
function user_settings_access_perm() {
return array(
'User Settings',
);
}
function user_settings_access_help($path, $arg) {
if ($path == 'admin/help#user_settings_access') {
$txt = 'Out of the box drupal have just one permissions adminster users which controls both user settings and users ';
$txt .= 'So the super user can either grant both privileges to other user or none of them. ';
$txt .= 'This mini module provides additional permission for user Settings.';
$txt .= 'This allows now the super user to grant either user settings or users or even both privileges if wanted';
$txt .= 'Sometime it could even helpfull to allow others to manage users but restrict the general users settings only to ';
$txt .= 'drupal admin.';
return '<p>' . t($txt) . '</p>';
}
}