function _user_sort

Same name and namespace in other branches
  1. 7.x drupal-7.x/modules/user/user.module \_user_sort()
2 string references to '_user_sort'
_user_categories in drupal-6.x/modules/user/user.module
Retrieve a list of all user setting/information categories and sort them by weight.
_user_forms in drupal-6.x/modules/user/user.module
Retrieve a list of all form elements for the specified category.

Archivo

drupal-6.x/modules/user/user.module, line 2008
Enables the user registration and login system.

Código

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));
}