215,225d214
<   $items['messages/new/%/anonymous'] = array(
<     'title'            => 'Write new message',
<     'page callback'    => 'drupal_get_form',
<     'page arguments'   => array('privatemsg_new_anonymous', 2, 3, NULL),
<     'file'             => 'privatemsg.pages.inc',
<     'access callback'  => 'privatemsg_user_access',
<     'access arguments' => array('write privatemsg'),
<     'type'             => MENU_NORMAL_ITEM,
<     'weight'           => -3,
<     //'menu_name'        => 'user-menu',
<   );
333,335c322,324
<   //if (!$account->uid) { // Disallow anonymous access, regardless of permissions
<   //  return FALSE;
<   //}
---
>   if (!$account->uid) { // Disallow anonymous access, regardless of permissions
>     return FALSE;
>   }
1918c1907
<  /* if (!privatemsg_user_access('write privatemsg', $account) || $account->uid == 0) {
---
>   if (!privatemsg_user_access('write privatemsg', $account) || $account->uid == 0) {
1920c1909
<   }*/
---
>   }
2346d2334
<   global $user;
2349,2350c2337
<   //print_r($user);exit;
<   if (in_array($node->type, $types) && !empty($url) && ($view_mode == 'full' || (variable_get('privatemsg_display_on_teaser', 1) && $view_mode == 'teaser')) && ($user->uid != 0)) {
---
>   if (in_array($node->type, $types) && !empty($url) && ($view_mode == 'full' || (variable_get('privatemsg_display_on_teaser', 1) && $view_mode == 'teaser'))) {
2354,2361d2340
<       'query' => drupal_get_destination(),
<       'attributes' => array('class' => 'privatemsg-send-link privatemsg-send-link-node'),
<     );
<   }
<   else{
<     $node->content['links']['#links']['privatemsg_link'] = array(
<       'title' => t('Send author a message'),
<       'href' => $url . '/anonymous/' . t('Message regarding @node', array('@node' => $node->title)),
