- drupal
- 7
| Versions | |
| 7 |
hook_user_categories() |
Retrieve a list of user setting or profile information categories.
Return value
An array of associative arrays. Each inner array has elements:
- "name": The internal name of the category.
- "title": The human-readable, localized name of the category.
- "weight": An integer specifying the category's sort ordering.
- "access callback": Name of the access callback function to use to
determine whether the user can edit the category. Defaults to using
user_edit_access(). See hook_menu() for more information on access
callbacks.
- "access arguments": Arguments for the access callback function. Defaults
to array(1).
Related topics
- Hooks
- Allow modules to interact with the Drupal core.
Code
drupal/modules/user/user.api.php, line 201
<?php
function hook_user_categories() {
return array(array(
'name' => 'account',
'title' => t('Account settings'),
'weight' => 1,
));
}
?>