Issue #967164 by Berdir: Fixed privatemsg_roles tries to send message to uid 0 for...
authorSascha Grossenbacher
Fri, 11 Mar 2011 13:45:22 +0000 (14:45 +0100)
committerSascha Grossenbacher
Sun, 13 Mar 2011 15:36:27 +0000 (16:36 +0100)
privatemsg_roles/privatemsg_roles.module

index 47d6b27..f0bfe7f 100644 (file)
@@ -84,7 +84,7 @@ function theme_privatemsg_roles_format($variables) {
 function privatemsg_roles_load_recipients($recipient, $limit, $offset) {
   $rid = isset($recipient->recipient) ? $recipient->recipient : $recipient->rid;
   if ($rid == DRUPAL_AUTHENTICATED_RID) {
-    $result = db_query_range('SELECT uid FROM {users} ORDER BY uid ASC', $offset, $limit);
+    $result = db_query_range('SELECT uid FROM {users} WHERE uid > 0 ORDER BY uid ASC', $offset, $limit);
   }
   else {
     $result = db_query_range('SELECT uid FROM {users_roles} WHERE rid = :rid ORDER BY uid ASC', $offset, $limit, array(':rid' => $rid));