# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
--- /drupal-6.19/modules/privatemsg-6.x-1.3/privatemsg/views/views_handler_field_privatemsg_link.inc
+++ /sites/all/modules/contrib/privatemsg/views/views_handler_field_privatemsg_link.inc
@@ -105,6 +105,8 @@
    * Renders our field, displays a link if the user is allowed to.
    */
   function render($values) {
+    global $user;
+
     if (isset($values->uid)) {
       $uid = $values->uid;
     }
@@ -114,6 +116,12 @@
     else {
       return '';
     }
+
+    // A user should not can write a message to yourself.
+    if ($user->uid == $uid) {
+      return '';
+    }
+    
\ No newline at end of file
     $text = t('Write private message');
     if (!empty($this->options['text'])) {
       $tokens = $this->get_render_tokens($this);
