Prevent polling contact of blocked users
This commit is contained in:
parent
33b8680dfd
commit
a905cdfd09
|
@ -45,10 +45,10 @@ class PollContacts
|
|||
|
||||
if (!empty($abandon_days)) {
|
||||
$condition = DBA::mergeConditions($condition,
|
||||
["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `account_expired` AND NOT `account_removed` AND `last-activity` > ?)", 0, DateTimeFormat::utc('now - ' . $abandon_days . ' days')]);
|
||||
["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `blocked` AND NOT `account_expired` AND NOT `account_removed` AND `last-activity` > ?)", 0, DateTimeFormat::utc('now - ' . $abandon_days . ' days')]);
|
||||
} else {
|
||||
$condition = DBA::mergeConditions($condition,
|
||||
["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `account_expired` AND NOT `account_removed`)", 0]);
|
||||
["`uid` != ? AND `uid` IN (SELECT `uid` FROM `user` WHERE NOT `blocked` AND NOT `account_expired` AND NOT `account_removed`)", 0]);
|
||||
}
|
||||
|
||||
$contacts = DBA::select('contact', ['id', 'nick', 'name', 'network', 'archive', 'last-update', 'priority', 'rating'], $condition);
|
||||
|
|
Loading…
Reference in a new issue