function user_delete_menu in User Delete 5
Same name and namespace in other branches
- 6.2 user_delete.module \user_delete_menu()
- 6 user_delete.module \user_delete_menu()
Implementation of hook_menu().
File
- ./
user_delete.module, line 33 - User delete - Let users delete their own account.
Code
function user_delete_menu($may_cache) {
global $user;
$items = array();
if (!$may_cache) {
$items[] = array(
'path' => 'user/' . arg(1) . '/delete',
'title' => t('Delete'),
'callback' => 'user_edit',
'access' => user_access('administer users') || user_access('delete own account') && arg(1) == $user->uid,
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/user/user_delete',
'title' => t('User delete'),
'description' => t("Configure the user delete action."),
'callback' => 'drupal_get_form',
'callback arguments' => 'user_delete_settings',
'access' => user_access('administer users'),
);
}
return $items;
}