Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.260
diff -u -p -r1.260 profile.module
--- modules/profile/profile.module	2 Jun 2009 00:23:42 -0000	1.260
+++ modules/profile/profile.module	2 Jun 2009 18:25:06 -0000
@@ -245,13 +245,6 @@ function profile_user_validate(&$edit, &
 }
 
 /**
- * Implement hook_user_categories().
- */
-function profile_user_categories($edit, $user, $category = NULL) {
-  return profile_categories();
-}
-
-/**
  * Implement hook_user_cancel().
  */
 function profile_user_cancel(&$edit, &$account, $method) {
@@ -495,8 +488,10 @@ function profile_validate_profile($edit,
 
   return $edit;
 }
-
-function profile_categories() {
+/**
+ * Implement hook_user_categories().
+ */
+function profile_user_categories() {
   $result = db_query("SELECT DISTINCT(category) FROM {profile_field}");
   $data = array();
   foreach ($result as $category) {
Index: modules/user/user.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.api.php,v
retrieving revision 1.5
diff -u -p -r1.5 user.api.php
--- modules/user/user.api.php	30 Apr 2009 16:10:10 -0000	1.5
+++ modules/user/user.api.php	2 Jun 2009 18:25:15 -0000
@@ -251,6 +251,15 @@ function hook_user_operations() {
   return $operations;
 }
 
+
+/**
+ * Retrieve a list of all user setting/information categories.
+ */
+function hook_user_categories() {
+    return array(array('name' => 'account', 'title' => t('Account settings'), 'weight' => 1));
+}
+
+
 /**
  * @} End of "addtogroup hooks".
  */
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.997
diff -u -p -r1.997 user.module
--- modules/user/user.module	2 Jun 2009 06:58:17 -0000	1.997
+++ modules/user/user.module	2 Jun 2009 18:25:18 -0000
@@ -998,9 +998,9 @@ function user_user_submit(&$edit, &$acco
 }
 
 /**
- * Implement hook_user_categories.
+ * Implement hook_user_categories().
  */
-function user_user_categories($edit, $account, $category = NULL) {
+function user_user_categories() {
     return array(array('name' => 'account', 'title' => t('Account settings'), 'weight' => 1));
 }
 
@@ -1437,8 +1437,7 @@ function user_menu() {
     'load arguments' => array('%map', '%index'),
   );
 
-  $empty_account = new stdClass();
-  if (($categories = _user_categories($empty_account)) && (count($categories) > 1)) {
+  if (($categories = _user_categories()) && (count($categories) > 1)) {
     foreach ($categories as $key => $category) {
       // 'account' is already handled by the MENU_DEFAULT_LOCAL_TASK.
       if ($category['name'] != 'account') {
@@ -1489,8 +1488,7 @@ function user_category_load($uid, &$map,
       // Check that the requested category exists.
       $valid = FALSE;
       if (!isset($user_categories)) {
-        $empty_account = new stdClass();
-        $user_categories = _user_categories($empty_account);
+        $user_categories = _user_categories();
       }
       foreach ($user_categories as $category) {
         if ($category['name'] == $category_path) {
@@ -2414,15 +2412,8 @@ function user_help($path, $arg) {
 /**
  * Retrieve a list of all user setting/information categories and sort them by weight.
  */
-function _user_categories($account) {
-  $categories = array();
-
-  foreach (module_implements('user_categories') as $module) {
-    if ($data = module_invoke($module, 'user_categories', NULL, $account, '')) {
-      $categories = array_merge($data, $categories);
-    }
-  }
-
+function _user_categories() {
+  $categories = module_invoke_all('user_categories');
   usort($categories, '_user_sort');
 
   return $categories;
