Same name and namespace in other branches
  1. 4.6.x modules/user.module \_user_categories()
  2. 4.7.x modules/user.module \_user_categories()
  3. 5.x modules/user/user.module \_user_categories()
  4. 7.x modules/user/user.module \_user_categories()

Retrieve a list of all user setting/information categories and sort them by weight.

1 call to _user_categories()
user_category_load in modules/user/user.module
Return a user object after checking if any profile category in the path exists.

File

modules/user/user.module, line 2019
Enables the user registration and login system.

Code

function _user_categories($account) {
  $categories = array();

  // Only variables can be passed by reference workaround.
  $null = NULL;
  foreach (module_list() as $module) {
    $function = $module . '_user';

    // $null and $account need to be passed by reference.
    if (function_exists($function) && ($data = $function('categories', $null, $account, ''))) {
      $categories = array_merge($data, $categories);
    }
  }
  usort($categories, '_user_sort');
  return $categories;
}