Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.681
diff -u -r1.681 user.module
--- modules/user/user.module	11 Sep 2006 09:05:46 -0000	1.681
+++ modules/user/user.module	12 Sep 2006 16:24:08 -0000
@@ -780,14 +780,12 @@
     // added once per request.
     drupal_add_css(drupal_get_path('module', 'user') .'/user.css', 'core');
 
-    if (arg(0) == 'user' && is_numeric(arg(1)) && arg(1) > 0) {
+    if (arg(0) == 'user' && arg(1) !== FALSE) {
       $account = user_load(array('uid' => arg(1)));
 
       if ($user !== FALSE) {
         // Always let a user view their own account
         $view_access |= $user->uid == arg(1);
-        // Only admins can view blocked accounts
-        $view_access &= $account->status || $admin_access;
 
         $items[] = array('path' => 'user/'. arg(1), 'title' => t('user'),
           'type' => MENU_CALLBACK, 'callback' => 'user_view',
@@ -1468,9 +1466,13 @@
   global $user;
 
   $account = user_load(array('uid' => $uid));
-  if ($account === FALSE || ($account->access == 0 && !user_access('administer users'))) {
+  if ($account === FALSE || empty($account->uid)) {
     return drupal_not_found();
   }
+  // Only user administrators can see blocked accounts.
+  elseif ($account->status == 0 && !user_access('administer users')) {
+    return drupal_access_denied();
+  }
   // Retrieve and merge all profile fields:
   $fields = array();
   foreach (module_list() as $module) {
