--- modules/contact/contact.module.1.119	Thu Aug 06 14:08:56 2009
+++ modules/contact/contact.module	Thu Aug 06 14:34:57 2009
@@ -98,7 +98,7 @@ function contact_menu() {
     'access arguments' => array('access site-wide contact form'),
     'type' => MENU_SUGGESTED_ITEM,
   );
-  $items['user/%user/contact'] = array(
+  $items['user/%user_not_anonymous/contact'] = array(
     'title' => 'Contact',
     'page callback' => 'contact_personal_page',
     'page arguments' => array(1),
@@ -111,7 +111,14 @@ function contact_menu() {
 }
 
 /**
- * Determine permission to a user's personal contact form.
+ * Menu access callback for a user's personal contact form.
+ *
+ * Only logged-in users can access personal contact forms.
+ * Except for user administrators, you are not allowed to access
+ * your own contact form.
+ *
+ * @param $account
+ *   A user account object for a registered (not anonymous) user. 
  */
 function _contact_personal_tab_access($account) {
   global $user;
@@ -119,7 +126,7 @@ function _contact_personal_tab_access($a
     $account->contact = FALSE;
   }
   return
-    $account && $user->uid &&
+    $user->uid &&
     (
       ($user->uid != $account->uid && $account->contact) ||
       user_access('administer users')
--- modules/contact/contact.test.1.28	Wed Aug 05 09:53:39 2009
+++ modules/contact/contact.test	Wed Aug 05 10:01:52 2009
@@ -380,5 +380,19 @@ class ContactPersonalTestCase extends Dr
 
     $this->drupalGet('user/' . $web_user4->uid . '/contact');
     $this->assertResponse(403, t('Access to personal contact form denied.'));
+
+    // Personal contact form tests for a user administrator.
+    $this->drupalLogout();
+    $admin_user2 = $this->drupalCreateUser(array('administer users'));
+
+    $this->drupalLogin($admin_user2);
+
+    // User administrator should not be affected by the user's personal contact form flag.
+    $this->drupalGet('user/' . $web_user4->uid . '/contact');
+    $this->assertResponse(200, t('Access to personal contact forms always granted to user administrators.'));
+
+    // Contact form doesn't exist for user 0.
+    $this->drupalGet('user/0/contact');
+    $this->assertResponse(404, t('No contact form for user 0.'));
   }
 }
--- modules/user/user.module.1.1018	Thu Aug 06 14:08:39 2009
+++ modules/user/user.module	Thu Aug 06 14:23:27 2009
@@ -1442,6 +1442,18 @@ function user_init() {
 function user_uid_optional_load($arg) {
   return user_load(isset($arg) ? $arg : $GLOBALS['user']->uid);
 }
+/**
+ * Loader function for the %user_not_anonymous placeholder.
+ */ 
+function user_not_anonymous_load($arg) {
+  $account = user_load($arg);
+  if (!empty($account) && $account->uid) {
+    return $account;
+  }
+  else {
+    return FALSE;
+  }
+}
 
 /**
  * Return a user object after checking if any profile category in the path exists.
