Index: privatemsg.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/privatemsg/privatemsg.module,v
retrieving revision 1.116
diff -u -p -r1.116 privatemsg.module
--- privatemsg.module	7 Jan 2010 10:17:05 -0000	1.116
+++ privatemsg.module	11 Feb 2010 19:51:47 -0000
@@ -967,21 +967,23 @@ function privatemsg_user($op, &$edit, &$
       return $form;
 
     case 'submit':
-      $current = privatemsg_is_disabled($account);
-      $disabled = (!$edit['pm_enable']);
-      unset($edit['pm_enable']);
-
-      $account->privatemsg_disabled = $disabled;
-
-      // only perform the save if the value has changed
-      if ($current != $disabled) {
-        if ($disabled) {
-          db_query('INSERT into {pm_disable} values (%d)', $account->uid);
-        }
-        else {
-          db_query('DELETE from {pm_disable} where uid = %d', $account->uid);
-        }
+      if ($category == 'account' && isset($edit['pm_enable'])) {
+        $current = privatemsg_is_disabled($account);
+        $disabled = (!$edit['pm_enable']);
+        unset($edit['pm_enable']);
+
+        $account->privatemsg_disabled = $disabled;
+
+        // only perform the save if the value has changed
+        if ($current != $disabled) {
+          if ($disabled) {
+            db_query('INSERT into {pm_disable} values (%d)', $account->uid);
+          }
+          else {
+            db_query('DELETE from {pm_disable} where uid = %d', $account->uid);
+          }
 
+        }
       }
       break;
 
