Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.348
diff -u -p -r1.348 block.module
--- modules/block/block.module	5 Jul 2009 18:00:07 -0000	1.348
+++ modules/block/block.module	5 Jul 2009 19:36:25 -0000
@@ -418,7 +418,7 @@ function block_box_save($edit, $delta) {
 /**
  * Implement hook_user_form().
  */
-function block_user_form(&$edit, &$account, $category = NULL) {
+function block_user_form(&$edit, $account, $category) {
   if ($category == 'account') {
     $rids = array_keys($account->roles);
     $result = db_query("SELECT DISTINCT b.* FROM {block} b LEFT JOIN {block_role} r ON b.module = r.module AND b.delta = r.delta WHERE b.status = 1 AND b.custom <> 0 AND (r.rid IN (:rids) OR r.rid IS NULL) ORDER BY b.weight, b.module", array(':rids' => $rids));
@@ -451,7 +451,7 @@ function block_user_form(&$edit, &$accou
 /**
  * Implement hook_user_validate().
  */
-function block_user_validate(&$edit, &$account, $category = NULL) {
+function block_user_validate(&$edit, $account, $category) {
   if (empty($edit['block'])) {
     $edit['block'] = array();
   }
Index: modules/blog/blog.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v
retrieving revision 1.327
diff -u -p -r1.327 blog.module
--- modules/blog/blog.module	5 Jul 2009 18:00:07 -0000	1.327
+++ modules/blog/blog.module	5 Jul 2009 19:36:25 -0000
@@ -44,7 +44,7 @@ function blog_access($op, $node, $accoun
 /**
  * Implement hook_user_view().
  */
-function blog_user_view(&$edit, &$user, $category) {
+function blog_user_view($user) {
   if (user_access('create blog content', $user)) {
     $user->content['summary']['blog'] =  array(
       '#type' => 'user_profile_item',
Index: modules/contact/contact.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.module,v
retrieving revision 1.118
diff -u -p -r1.118 contact.module
--- modules/contact/contact.module	5 Jul 2009 18:00:08 -0000	1.118
+++ modules/contact/contact.module	5 Jul 2009 19:36:26 -0000
@@ -138,7 +138,7 @@ function contact_load($cid) {
 /**
  * Implement hook_user_form().
  */
-function contact_user_form(&$edit, &$user, $category = NULL) {
+function contact_user_form(&$edit, $user, $category) {
   if ($category == 'account') {
     $form['contact'] = array('#type' => 'fieldset',
       '#title' => t('Contact settings'),
@@ -157,14 +157,14 @@ function contact_user_form(&$edit, &$use
 /**
  * Implement hook_user_insert().
  */
-function contact_user_insert(&$edit, &$user, $category = NULL) {
+function contact_user_insert(&$edit, $user, $category) {
   $edit['contact'] = variable_get('contact_default_status', 1);
 }
 
 /**
  * Implement hook_user_validate().
  */
-function contact_user_validate(&$edit, &$user, $category = NULL) {
+function contact_user_validate(&$edit, $user, $category) {
   return array('contact' => isset($edit['contact']) ? $edit['contact'] : FALSE);
 }
 
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.243
diff -u -p -r1.243 locale.module
--- modules/locale/locale.module	5 Jul 2009 18:00:09 -0000	1.243
+++ modules/locale/locale.module	5 Jul 2009 19:36:27 -0000
@@ -212,7 +212,7 @@ function locale_locale($op = 'groups') {
 /**
  * Implement hook_user_register().
  */
-function locale_user_register(&$edit, &$user, $category = NULL) {
+function locale_user_register(&$edit, $user, $category) {
   // If we have more then one language and either creating a user on the
   // admin interface or edit the user, show the language selector.
   if (variable_get('language_count', 1) > 1 && user_access('administer users')) {
@@ -223,7 +223,7 @@ function locale_user_register(&$edit, &$
 /**
  * Implement hook_user_form().
  */
-function locale_user_form(&$edit, &$user, $category = NULL) {
+function locale_user_form(&$edit, $user, $category) {
   // If we have more then one language and either creating a user on the
   // admin interface or edit the user, show the language selector.
   if (variable_get('language_count', 1) > 1 && $category == 'account') {
Index: modules/openid/openid.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v
retrieving revision 1.51
diff -u -p -r1.51 openid.module
--- modules/openid/openid.module	30 Jun 2009 11:32:08 -0000	1.51
+++ modules/openid/openid.module	5 Jul 2009 19:36:27 -0000
@@ -59,7 +59,7 @@ function openid_help($path, $arg) {
 /**
  * Implement hook_user_insert().
  */
-function openid_user_insert(&$edit, &$account, $category = NULL) {
+function openid_user_insert(&$edit, $account, $category) {
   if (isset($_SESSION['openid']['values'])) {
     // The user has registered after trying to login via OpenID.
     if (variable_get('user_email_verification', TRUE)) {
Index: modules/profile/profile.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.261
diff -u -p -r1.261 profile.module
--- modules/profile/profile.module	3 Jun 2009 07:28:28 -0000	1.261
+++ modules/profile/profile.module	5 Jul 2009 19:36:27 -0000
@@ -205,49 +205,49 @@ function profile_block_view($delta = '')
 /**
  * Implement hook_user_register().
  */
-function profile_user_register(&$edit, &$user, $category = NULL) {
+function profile_user_register(&$edit, $user, $category) {
   return profile_form_profile($edit, $user, $category, TRUE);
 }
 
 /**
  * Implement hook_user_update().
  */
-function profile_user_update(&$edit, &$user, $category = NULL) {
+function profile_user_update(&$edit, $user, $category) {
   return profile_save_profile($edit, $user, $category);
 }
 
 /**
  * Implement hook_user_insert().
  */
-function profile_user_insert(&$edit, &$user, $category = NULL) {
+function profile_user_insert(&$edit, $user, $category) {
   return profile_save_profile($edit, $user, $category, TRUE);
 }
 
 /**
  * Implement hook_user_view().
  */
-function profile_user_view(&$edit, &$user, $category = NULL) {
+function profile_user_view($user) {
   return profile_view_profile($user);
 }
 
 /**
  * Implement hook_user_form().
  */
-function profile_user_form(&$edit, &$user, $category = NULL) {
+function profile_user_form(&$edit, $user, $category) {
   return profile_form_profile($edit, $user, $category);
 }
 
 /**
  * Implement hook_user_validate().
  */
-function profile_user_validate(&$edit, &$user, $category = NULL) {
+function profile_user_validate(&$edit, $user, $category) {
   return profile_validate_profile($edit, $category);
 }
 
 /**
  * Implement hook_user_cancel().
  */
-function profile_user_cancel(&$edit, &$account, $method) {
+function profile_user_cancel(&$edit, $account, $method) {
   switch ($method) {
     case 'user_cancel_reassign':
     case 'user_cancel_delete':
@@ -270,7 +270,7 @@ function profile_user_load($users) {
   }
 }
 
-function profile_save_profile(&$edit, &$user, $category, $register = FALSE) {
+function profile_save_profile(&$edit, $user, $category, $register = FALSE) {
   $result = _profile_get_fields($category, $register);
   foreach ($result as $field) {
     if (_profile_field_serialize($field->type)) {
@@ -335,7 +335,7 @@ function profile_view_field($user, $fiel
   }
 }
 
-function profile_view_profile(&$user) {
+function profile_view_profile($user) {
 
   $user = user_load($user->uid);
 
Index: modules/system/system.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v
retrieving revision 1.47
diff -u -p -r1.47 system.api.php
--- modules/system/system.api.php	5 Jul 2009 18:00:10 -0000	1.47
+++ modules/system/system.api.php	5 Jul 2009 19:36:28 -0000
@@ -581,21 +581,6 @@ function hook_link_alter(array &$links, 
 }
 
 /**
- * Perform alterations profile items before they are rendered. You may omit/add/re-sort/re-categorize, etc.
- *
- * @param $account
- *   A user object whose profile is being rendered. Profile items
- *   are stored in $account->content.
- * @return
- *   None.
- */
-function hook_profile_alter(&$account) {
-  foreach ($account->content AS $key => $field) {
-    // do something
-  }
-}
-
-/**
  * Alter any aspect of email sent by Drupal. You can use this hook
  * to add a common site footer to all outgoing email, add extra header
  * fields, and/or modify the email in any way. HTML-izing the
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.722
diff -u -p -r1.722 system.module
--- modules/system/system.module	5 Jul 2009 18:00:10 -0000	1.722
+++ modules/system/system.module	5 Jul 2009 19:36:30 -0000
@@ -1354,7 +1354,7 @@ function system_preprocess_page(&$variab
 /**
  * Implement hook_user_form().
  */
-function system_user_form(&$edit, &$user, $category = NULL) {
+function system_user_form(&$edit, $user, $category) {
   if ($category == 'account') {
     $form['theme_select'] = system_theme_select_form(t('Selecting a different theme will change the look and feel of the site.'), isset($edit['theme']) ? $edit['theme'] : NULL, 2);
     if (variable_get('configurable_timezones', 1)) {
@@ -1367,7 +1367,7 @@ function system_user_form(&$edit, &$user
 /**
  * Implement hook_user_register().
  */
-function system_user_register(&$edit, &$user, $category = NULL) {
+function system_user_register(&$edit, $user, $category) {
   if (variable_get('configurable_timezones', 1)) {
     $form = array();
     if (variable_get('user_default_timezone', DRUPAL_USER_TIMEZONE_DEFAULT) == DRUPAL_USER_TIMEZONE_SELECT) {
@@ -1386,7 +1386,7 @@ function system_user_register(&$edit, &$
 /**
  * Implement hook_user_login().
  */
-function system_user_login(&$edit, &$user, $category = NULL) {
+function system_user_login(&$edit, $user) {
   // If the user has a NULL time zone, notify them to set a time zone.
   if (!$user->timezone && variable_get('configurable_timezones', 1) && variable_get('empty_timezone_message', 0)) {
     drupal_set_message(t('Please configure your <a href="@user-edit">account time zone setting</a>.', array('@user-edit' => url("user/$user->uid/edit", array('query' => drupal_get_destination(), 'fragment' => 'edit-timezone')))));
Index: modules/trigger/trigger.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/trigger/trigger.module,v
retrieving revision 1.40
diff -u -p -r1.40 trigger.module
--- modules/trigger/trigger.module	1 Jul 2009 20:39:20 -0000	1.40
+++ modules/trigger/trigger.module	5 Jul 2009 19:36:30 -0000
@@ -416,28 +416,28 @@ function _trigger_normalize_user_context
 /**
  * trigger_user_login
  */
-function trigger_user_login(&$edit, &$account, $category) {
+function trigger_user_login(&$edit, $account, $category) {
   _trigger_user('login', $edit, $account, $category);
 }
 
 /**
  * Implement hook_user_logout().
  */
-function trigger_user_logout($edit, $account) {
-  _trigger_user('logout', $edit, $account);
+function trigger_user_logout($account) {
+  _trigger_user('logout', $edit = NULL, $account);
 }
 
 /**
  * Implement hook_user_insert().
  */
-function trigger_user_insert(&$edit, &$account, $category) {
+function trigger_user_insert(&$edit, $account, $category) {
   _trigger_user('insert', $edit, $account, $category);
 }
 
 /**
  * Implement hook_user_update().
  */
-function trigger_user_update(&$edit, &$account, $category) {
+function trigger_user_update(&$edit, $account, $category) {
   _trigger_user('update', $edit, $account, $category);
 }
 
@@ -456,8 +456,8 @@ function trigger_user_cancel($edit, $acc
 /**
  * Implement hook_user_view().
  */
-function trigger_user_view(&$edit, &$account, $category) {
-  _trigger_user('view', $edit, $account, $category);
+function trigger_user_view($account) {
+  _trigger_user('view', $edit = NULL, $account, NULL);
 }
 
 /**
@@ -465,7 +465,7 @@ function trigger_user_view(&$edit, &$acc
  *
  * @TODO: Take advantage of the new API and reorganise/remove this function.
  */
-function _trigger_user($op, &$edit, &$account, $category = NULL) {
+function _trigger_user($op, &$edit, $account, $category = NULL) {
   // Keep objects for reuse so that changes actions make to objects can persist.
   static $objects;
   $aids = _trigger_get_hook_aids('user', $op);
Index: modules/user/user.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.api.php,v
retrieving revision 1.7
diff -u -p -r1.7 user.api.php
--- modules/user/user.api.php	15 Jun 2009 19:21:54 -0000	1.7
+++ modules/user/user.api.php	5 Jul 2009 19:36:31 -0000
@@ -12,79 +12,6 @@
  */
 
 /**
- * Act on user account actions.
- *
- * This hook allows modules to react when operations are performed on user
- * accounts.
- *
- * @param $op
- *   What kind of action is being performed. Possible values (in alphabetical order):
- *   - "after_update": The user object has been updated and changed. Use this if
- *     (probably along with 'insert') if you want to reuse some information from
- *     the user object.
- *   - "categories": A set of user information categories is requested.
- *   - "form": The user account edit form is about to be displayed. The module
- *     should present the form elements it wishes to inject into the form.
- *   - "insert": The user account is being added. The module should save its
- *     custom additions to the user object into the database and set the saved
- *     fields to NULL in $edit.
- *   - "load": The user account is being loaded. The module may respond to this
- *     and insert additional information into the user object.
- *   - "login": The user just logged in.
- *   - "logout": The user just logged out.
- *   - "register": The user account registration form is about to be displayed.
- *     The module should present the form elements it wishes to inject into the
- *     form.
- *   - "submit": Modify the account before it gets saved.
- *   - "update": The user account is being changed. The module should save its
- *     custom additions to the user object into the database and set the saved
- *     fields to NULL in $edit.
- *   - "validate": The user account is about to be modified. The module should
- *     validate its custom additions to the user object, registering errors as
- *     necessary.
- *   - "view": The user's account information is being displayed. The module
- *     should format its custom additions for display and add them to the
- *     $account->content array.
- * @param &$edit
- *   The array of form values submitted by the user.
- * @param &$account
- *   The user object on which the operation is being performed.
- * @param $category
- *   The active category of user information being edited.
- * @return
- *   This varies depending on the operation.
- *   - "categories": A linear array of associative arrays. These arrays have
- *     keys:
- *     - "name": The internal name of the category.
- *     - "title": The human-readable, localized name of the category.
- *     - "weight": An integer specifying the category's sort ordering.
- *   - "delete": None.
- *   - "form", "register": A $form array containing the form elements to display.
- *   - "insert": None.
- *   - "load": None.
- *   - "login": None.
- *   - "logout": None.
- *   - "submit": None:
- *   - "update": None.
- *   - "validate": None.
- *   - "view": None. For an example see: user_user().
- */
-function hook_user($op, &$edit, &$account, $category = NULL) {
-  if ($op == 'form' && $category == 'account') {
-    $form['comment_settings'] = array(
-      '#type' => 'fieldset',
-      '#title' => t('Comment settings'),
-      '#collapsible' => TRUE,
-      '#weight' => 4);
-    $form['comment_settings']['signature'] = array(
-      '#type' => 'textarea',
-      '#title' => t('Signature'),
-      '#default_value' => $edit['signature'],
-      '#description' => t('Your signature will be publicly displayed at the end of your comments.'));
-    return $form;
-  }
-}
-/**
  * Act on user objects when loaded from the database.
  *
  * Due to the static cache in user_load_multiple() you should not use this
@@ -251,9 +178,30 @@ function hook_user_operations() {
   return $operations;
 }
 
+/**
+ * The user object has been updated and changed.
+ *
+ * Use this if (probably along with 'insert') if you want to reuse some
+ * information from the user object.
+ *
+ * @param &$edit
+ *   The array of form values submitted by the user.
+ * @param $account
+ *   The user object on which the operation is being performed.
+ * @param $category
+ *   The active category of user information being edited.
+ */
+function hook_user_after_update(&$edit, $account, $category) {
+}
 
 /**
  * Retrieve a list of all user setting/information categories.
+ *
+ * @return
+ *   A linear array of associative arrays. These arrays have keys:
+ *   - "name": The internal name of the category.
+ *   - "title": The human-readable, localized name of the category.
+ *   - "weight": An integer specifying the category's sort ordering.
  */
 function hook_user_categories() {
   return array(array(
@@ -263,6 +211,181 @@ function hook_user_categories() {
   ));
 }
 
+/**
+ * The user account edit form is about to be displayed.
+ *
+ * The module should present the form elements it wishes to inject
+ * into the form.
+ *
+ * @param &$edit
+ *   The array of form values submitted by the user.
+ * @param $account
+ *   The user object on which the operation is being performed.
+ * @param $category
+ *   The active category of user information being edited.
+ * @return
+ *   A $form array containing the form elements to display.
+ */
+function hook_user_form(&$edit, $account, $category = NULL) {
+  if ($category == 'account') {
+    $form['comment_settings'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Comment settings'),
+      '#collapsible' => TRUE,
+      '#weight' => 4);
+    $form['comment_settings']['signature'] = array(
+      '#type' => 'textarea',
+      '#title' => t('Signature'),
+      '#default_value' => $edit['signature'],
+      '#description' => t('Your signature will be publicly displayed at the end of your comments.'));
+    return $form;
+  }
+}
+
+
+/**
+ * The user account is being added.
+ *
+ * The module should save its custom additions to the user object into the
+ * database and set the saved fields to NULL in $edit.
+ *
+ * @param &$edit
+ *   The array of form values submitted by the user.
+ * @param $account
+ *   The user object on which the operation is being performed.
+ * @param $category
+ *   The active category of user information being edited.
+ */
+function hook_user_insert(&$edit, $account, $category) {
+  db_insert('mytable')
+    ->fields(array(
+      'myfield' => $edit['myfield'],
+      'uid' => $account->uid,
+    ))
+    ->execute();
+  $edit['myfield'] = NULL;
+}
+
+/**
+ * The user just logged in.
+ *
+ * @param &$edit
+ *   The array of form values submitted by the user.
+ * @param $account
+ *   The user object on which the operation is being performed.
+ */
+function hook_user_login(&$edit, $account) {
+  // If the user has a NULL time zone, notify them to set a time zone.
+  if (!$user->timezone && variable_get('configurable_timezones', 1) && variable_get('empty_timezone_message', 0)) {
+    drupal_set_message(t('Please configure your <a href="@user-edit">account time zone setting</a>.', array('@user-edit' => url("user/$user->uid/edit", array('query' => drupal_get_destination(), 'fragment' => 'edit-timezone')))));
+  }
+}
+
+/**
+ * The user just logged out.
+ *
+ * @param $account
+ *   The user object on which the operation is being performed.
+ */
+function hook_user_logout($account) {
+
+}
+
+/**
+ * The user account registration form is about to be displayed.
+ *
+ * The module should present the form elements it wishes to inject into the
+ * form.
+ *
+ * @param &$edit
+ *   The array of form values submitted by the user.
+ * @param $account
+ *   The user object on which the operation is being performed.
+ * @param $category
+ *   The active category of user information being edited.
+ * @return
+ *   A $form array containing the form elements to display.
+ */
+function hook_user_register(&$edit, $account, $category) {
+  if (variable_get('configurable_timezones', 1)) {
+    $form = array();
+    if (variable_get('user_default_timezone', DRUPAL_USER_TIMEZONE_DEFAULT) == DRUPAL_USER_TIMEZONE_SELECT) {
+      system_user_timezone($edit, $form);
+    }
+    else {
+      $form['timezone'] = array(
+        '#type' => 'hidden',
+        '#value' => variable_get('user_default_timezone', DRUPAL_USER_TIMEZONE_DEFAULT) ? '' : variable_get('date_default_timezone', ''),
+      );
+    }
+    return $form;
+  }
+}
+
+/**
+ * Modify the account before it gets saved.
+ *
+ * @param &$edit
+ *   The array of form values submitted by the user.
+ * @param $account
+ *   The user object on which the operation is being performed.
+ * @param $category
+ *   The active category of user information being edited.
+ */
+function hook_user_submit(&$edit, $account, $category) {
+
+}
+
+/**
+ * The user account is being changed.
+ *
+ * The module should save its custom additions to the user object into the
+ * database and set the saved fields to NULL in $edit.
+ *
+ * @param &$edit
+ *   The array of form values submitted by the user.
+ * @param $account
+ *   The user object on which the operation is being performed.
+ * @param $category
+ *   The active category of user information being edited.
+ */
+function hook_user_update(&$edit, $account, $category) {
+  db_update('mytable')
+    ->fields(array('myfield' => $edit['myfield']))
+    ->condition('uid', $account->uid)
+    ->execute();
+  $edit['myfield'] = NULL;
+}
+
+/**
+ * The user account is about to be modified.
+ *
+ * The module should validate its custom additions to the user object,
+ * registering errors as necessary.
+ *
+ * @param &$edit
+ *   The array of form values submitted by the user.
+ * @param $account
+ *   The user object on which the operation is being performed.
+ * @param $category
+ *   The active category of user information being edited.
+ */
+function hook_user_validate(&$edit, $account, $category) {
+  
+}
+
+/**
+ * The user's account information is being displayed.
+ *
+ * The module should format its custom additions for display and add them to the
+ * $account->content array.
+ *
+ * @param $account
+ *   The user object on which the operation is being performed.
+ */
+function hook_user_view($account) {
+
+}
 
 /**
  * @} End of "addtogroup hooks".
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1008
diff -u -p -r1.1008 user.module
--- modules/user/user.module	5 Jul 2009 18:07:04 -0000	1.1008
+++ modules/user/user.module	5 Jul 2009 19:36:33 -0000
@@ -23,7 +23,7 @@ define('EMAIL_MAX_LENGTH', 64);
  * We cannot use module_invoke() for this, because the arguments need to
  * be passed by reference.
  */
-function user_module_invoke($type, &$array, &$user, $category = NULL) {
+function user_module_invoke($type, &$array, $user, $category = NULL) {
   foreach (module_implements('user_' . $type) as $module) {
     $function = $module . '_user_' . $type;
     $function($array, $user, $category);
@@ -864,7 +864,7 @@ function user_elements() {
 /**
  * Implement hook_user_view().
  */
-function user_user_view(&$edit, &$account, $category = NULL) {
+function user_user_view($account) {
   $account->content['user_picture'] = array(
     '#markup' => theme('user_picture', $account),
     '#weight' => -10,
@@ -888,7 +888,7 @@ function user_user_view(&$edit, &$accoun
 /**
  * Implement hook_user_form.
  */
-function user_user_form(&$edit, &$account, $category = NULL) {
+function user_user_form(&$edit, $account, $category) {
   if ($category == 'account') {
     $form_state = array();
     return user_edit_form($form_state, (isset($account->uid) ? $account->uid : FALSE), $edit);
@@ -898,7 +898,7 @@ function user_user_form(&$edit, &$accoun
 /**
  * Implement hook_user_validate().
  */
-function user_user_validate(&$edit, &$account, $category = NULL) {
+function user_user_validate(&$edit, $account, $category) {
   if ($category == 'account') {
     $uid = isset($account->uid) ? $account->uid : FALSE;
     // Validate the username when: new user account; or user is editing own account and can change username; or an admin user.
@@ -939,7 +939,7 @@ function user_user_validate(&$edit, &$ac
 /**
  * Implement hook_user_submit().
  */
-function user_user_submit(&$edit, &$account, $category = NULL) {
+function user_user_submit(&$edit, $account, $category) {
   if ($category == 'account') {
     if (!empty($edit['picture_upload'])) {
       $edit['picture'] = $edit['picture_upload'];
@@ -1990,19 +1990,14 @@ function _user_cancel($edit, $account, $
  * @return
  *   A structured array containing the individual elements of the profile.
  */
-function user_build_content(&$account) {
-  $edit = NULL;
+function user_build_content($account) {
   $account->content = array();
 
   // Build fields content.
   // TODO D7 : figure out where exactly this needs to go
   $account->content += field_attach_view('user', $account);
 
-  user_module_invoke('view', $edit, $account);
-
-  // Allow modules to modify the fully-built profile.
-  drupal_alter('profile', $account);
-
+  module_invoke_all('user_view', $account);
   return $account->content;
 }
 
Index: modules/user/user.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v
retrieving revision 1.45
diff -u -p -r1.45 user.pages.inc
--- modules/user/user.pages.inc	1 Jul 2009 12:47:30 -0000	1.45
+++ modules/user/user.pages.inc	5 Jul 2009 19:36:34 -0000
@@ -136,7 +136,7 @@ function user_logout() {
 
   watchdog('user', 'Session closed for %name.', array('%name' => $user->name));
 
-  module_invoke_all('user_logout', NULL, $user);
+  module_invoke_all('user_logout', $user);
 
   // Destroy the current session, and reset $user to the anonymous user.
   session_destroy();
