--- 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/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 > 0) {
+    return $account;
+  }
+  else {
+    return FALSE;
+  }
+}
 
 /**
  * Return a user object after checking if any profile category in the path exists.
