rendered paste body--- includes/acp/acp_email.php.old 2009-05-31 12:58:58.000000000 +0200
+++ includes/acp/acp_email.php 2009-06-11 15:08:17.000000000 +0200
@@ -72,7 +72,7 @@
if ($usernames)
{
// If giving usernames the admin is able to email inactive users too...
- $sql = 'SELECT username, user_email, user_jabber, user_notify_type, user_lang
+ $sql = 'SELECT username, user_email, user_jabber, user_notify_type, user_lang, user_lastvisit
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('username_clean', array_map('utf8_clean_string', explode("\n", $usernames))) . '
AND user_allow_massemail = 1
@@ -82,7 +82,7 @@
{
if ($group_id)
{
- $sql = 'SELECT u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type
+ $sql = 'SELECT u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type, u.user_lastvisit
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug
WHERE ug.group_id = ' . $group_id . '
AND ug.user_pending = 0
@@ -93,7 +93,7 @@
}
else
{
- $sql = 'SELECT username, username_clean, user_email, user_jabber, user_notify_type, user_lang
+ $sql = 'SELECT username, username_clean, user_email, user_jabber, user_notify_type, user_lang, user_lastvisit
FROM ' . USERS_TABLE . '
WHERE user_allow_massemail = 1
AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
@@ -141,6 +141,7 @@
$email_list[$j][$i]['email'] = $row['user_email'];
$email_list[$j][$i]['name'] = $row['username'];
$email_list[$j][$i]['jabber'] = $row['user_jabber'];
+ $email_list[$j][$i]['lastvisit'] = $row['user_lastvisit'];
$i++;
}
}
@@ -179,7 +180,9 @@
$messenger->assign_vars(array(
'CONTACT_EMAIL' => $config['board_contact'],
- 'MESSAGE' => htmlspecialchars_decode($message))
+ 'MESSAGE' => htmlspecialchars_decode($message)),
+ 'USER' => $email_row['name'],
+ 'LASTVISIT' => $email_row['lastvisit']
);
if (!($messenger->send($used_method)))
@@ -259,4 +262,4 @@
}
}
-?>
\ No newline at end of file
+?>