Skip to content

Commit 03e4045

Browse files
committed
updates fixing db issue in abuse checker
1 parent c412001 commit 03e4045

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/ImapAbuseCheck.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,15 +273,15 @@ public function process($type = 'spam', $limit = false)
273273
preg_match_all('/smtp.auth=(?P<user>\S*)\s/ms', $this->plainmsg, $matches)) {
274274
foreach ($matches['user'] as $user) {
275275
if (in_array($user, $this->mb_users)) {
276-
$mbUser = $this->mb_db->real_escape($user);
277-
$this->mb_db->query("select * from mail where mail_username='{$mbUser}'");
278-
if ($this->mb_db->num_rows() > 0) {
279-
$this->mb_db->next_record(MYSQL_ASSOC);
280-
$data = $GLOBALS['tf']->accounts->read($this->mb_db->Record['mail_custid']);
276+
$mbUser = $db->real_escape($user);
277+
$db->query("select * from mail where mail_username='{$mbUser}'");
278+
if ($db->num_rows() > 0) {
279+
$db->next_record(MYSQL_ASSOC);
280+
$data = $GLOBALS['tf']->accounts->read($db->Record['mail_custid']);
281281
$email = (!isset($data['email_abuse']) || trim($data['email_abuse']) == '') ? $data['email'] : $data['email_abuse'];
282282
$server_data = [
283283
'email' => $data['emai'],
284-
'status' => $this->mb_db->Record['mail_status']
284+
'status' => $db->Record['mail_status']
285285
];
286286
}
287287
}

0 commit comments

Comments
 (0)