Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1170
diff -u -p -r1.1170 user.module
--- modules/user/user.module	12 May 2010 08:35:39 -0000	1.1170
+++ modules/user/user.module	18 May 2010 09:54:05 -0000
@@ -920,7 +920,7 @@ function user_user_view($account) {
 
 /**
  * Helper function to add default user account fields to user registration and edit form.
- * 
+ *
  * @see user_account_form_validate()
  * @see user_validate_current_pass()
  * @see user_validate_picture()
@@ -1098,7 +1098,7 @@ function user_account_form(&$form, &$for
 
 /**
  * Form validation handler for the current password on the user_account_form().
- * 
+ *
  * @see user_account_form()
  */
 function user_validate_current_pass(&$form, &$form_state) {
@@ -1124,7 +1124,7 @@ function user_validate_current_pass(&$fo
 
 /**
  * Form validation handler for user_account_form().
- * 
+ *
  * @see user_account_form()
  */
 function user_account_form_validate($form, &$form_state) {
@@ -2285,8 +2285,15 @@ function user_delete_multiple(array $uid
 
 /**
  * Page callback wrapper for user_view().
+ *
+ * @param $account
+ *   A user object or uid.
  */
-function user_view_page($uid) {
+function user_view_page($account) {
+  if (is_object($account)) {
+    return user_view($account);
+  }
+  $uid = $account;
   // An administrator may try to view a non-existent account,
   // so we give them a 404 (versus a 403 for non-admins).
   $account = user_load($uid);
