projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add UFC_Mentor_*
[platal.git]
/
include
/
massmailer.inc.php
diff --git
a/include/massmailer.inc.php
b/include/massmailer.inc.php
index
95748f6
..
decda36
100644
(file)
--- a/
include/massmailer.inc.php
+++ b/
include/massmailer.inc.php
@@
-190,8
+190,7
@@
abstract class MassMailer
protected function getAllRecipients()
{
global $globals;
protected function getAllRecipients()
{
global $globals;
- return "SELECT a.uid, a.hruid, a.display_name, a.full_name, a.email_format,
- ni.hash AS hash
+ return "SELECT a.uid
FROM {$this->_subscriptionTable} AS ni
INNER JOIN accounts AS a ON (ni.user_id = a.uid)
LEFT JOIN email_options AS eo ON (eo.uid = a.uid)
FROM {$this->_subscriptionTable} AS ni
INNER JOIN accounts AS a ON (ni.user_id = a.uid)
LEFT JOIN email_options AS eo ON (eo.uid = a.uid)
@@
-206,12
+205,11
@@
abstract class MassMailer
$this->setSent();
$query = XDB::format($this->getAllRecipients(), $this->id()) . ' LIMIT 60';
while (true) {
$this->setSent();
$query = XDB::format($this->getAllRecipients(), $this->id()) . ' LIMIT 60';
while (true) {
- $
res = XDB::iterRow($query
);
- if (
!$res->total()
) {
+ $
users = User::getBulkUsersWithUIDs(XDB::fetchColumn($query)
);
+ if (
count($users) == 0
) {
return;
}
return;
}
- while ($infos = $res->next()) {
- $user = User::getSilentWithValues(null, $infos);
+ foreach ($users as $user) {
$sent[] = XDB::format('user_id = {?}', $user->id());
$this->sendTo($user, $hash);
}
$sent[] = XDB::format('user_id = {?}', $user->id());
$this->sendTo($user, $hash);
}