function _user_sort
1 string reference to '_user_sort'
- _user_categories in modules/
user/ user.module - Retrieve a list of all user setting/information categories and sort them by weight.
File
-
modules/
user/ user.module, line 3486
Code
function _user_sort($a, $b) {
$a = (array) $a + array(
'weight' => 0,
'title' => '',
);
$b = (array) $b + array(
'weight' => 0,
'title' => '',
);
return $a['weight'] < $b['weight'] ? -1 : ($a['weight'] > $b['weight'] ? 1 : ($a['title'] < $b['title'] ? -1 : 1));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.