? sites/all/modules/devel
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: modules/contact/contact.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.module,v
retrieving revision 1.141
diff -u -p -r1.141 contact.module
--- modules/contact/contact.module	4 Jan 2010 21:31:52 -0000	1.141
+++ modules/contact/contact.module	13 Jan 2010 02:45:38 -0000
@@ -144,6 +144,11 @@ function _contact_personal_tab_access(st
     return FALSE;
   }
 
+  // If requested user has been blocked, do not allow users to contact them.
+  if (empty($account->status)) {
+    return FALSE;
+  }
+
   return user_access('access user contact forms');
 }
 
Index: modules/contact/contact.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.test,v
retrieving revision 1.40
diff -u -p -r1.40 contact.test
--- modules/contact/contact.test	9 Jan 2010 23:03:21 -0000	1.40
+++ modules/contact/contact.test	13 Jan 2010 02:45:38 -0000
@@ -347,6 +347,20 @@ class ContactPersonalTestCase extends Dr
     $this->drupalLogin($this->admin_user);
     $this->drupalGet('user/' . $this->contact_user->uid . '/contact');
     $this->assertResponse(200);
+
+    // Re-create our contacted user as a blocked user.
+    $this->contact_user = $this->drupalCreateUser();
+    $this->contact_user->status = 0; 
+
+    // Test that blocked users can still be contacted by admin.
+    $this->drupalLogin($this->admin_user);
+    $this->drupalGet('user/' . $this->contact_user->uid . '/contact');
+    $this->assertResponse(200);
+
+    // Test that blocked users cannot be contacted by non-admins.
+    $this->drupalLogin($this->web_user);
+    $this->drupalGet('user/' . $this->contact_user->uid . '/contact');
+    $this->assertResponse(403);
   }
 
   /**
