_user_categories

Versions
4.6
_user_categories()
4.7 – 6
_user_categories($account)
7
_user_categories()

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

▾ 2 functions call _user_categories()

user_category_load in modules/user/user.module
Return a user object after checking if any profile category in the path exists.
user_menu in modules/user/user.module
Implementation of hook_menu().

Code

modules/user/user.module, line 1946

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.