summaryrefslogtreecommitdiffstats
path: root/print_mail
diff options
context:
space:
mode:
authorvisabhishek2016-12-13 15:25:49 +0100
committerJoao Ventura2016-12-13 15:25:49 +0100
commitbdad10a7485f66193c96a8e5959743669fe42296 (patch)
treec162273f4fbaaee1aacdbafb839a171bdac67adf /print_mail
parent719f08cecef3060c87a6ede20c431afad6821dcc (diff)
Issue #2427639 by abarpetia, zealfire, visabhishek: User list in send by email
Diffstat (limited to 'print_mail')
-rw-r--r--print_mail/print_mail.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/print_mail/print_mail.inc b/print_mail/print_mail.inc
index 98caad4..6db194e 100644
--- a/print_mail/print_mail.inc
+++ b/print_mail/print_mail.inc
@@ -101,10 +101,10 @@ function print_mail_form_for_path($form, &$form_state, $path, $query = NULL, $us
$options = array();
if ($print_mail_user_recipients_default) {
if (module_exists('realname')) {
- $sql = "SELECT u.mail, r.realname AS name from {users} u LEFT JOIN {realname} r ON u.uid = r.uid WHERE u.uid <> :uid ORDER BY name ASC";
+ $sql = "SELECT u.mail, r.realname AS name from {users} u LEFT JOIN {realname} r ON u.uid = r.uid WHERE u.uid <> :uid AND status = 1 ORDER BY name ASC";
}
else {
- $sql = "SELECT mail, name from {users} WHERE uid <> :uid ORDER BY name ASC";
+ $sql = "SELECT mail, name from {users} WHERE uid <> :uid AND status = 1 ORDER BY name ASC";
}
$recipients = db_query($sql, array(':uid' => drupal_anonymous_user()->uid));
foreach ($recipients as $recipient) {