Checking for blocked user does now check for blocked domain as well

This commit is contained in:
Michael 2018-11-22 21:43:16 +00:00
parent cf1c63fcc2
commit fb0140a62b
1 changed files with 6 additions and 1 deletions

View File

@ -1285,10 +1285,15 @@ class Contact extends BaseObject
return false;
}
$blocked = DBA::selectFirst('contact', ['blocked'], ['id' => $cid]);
$blocked = DBA::selectFirst('contact', ['blocked', 'url'], ['id' => $cid]);
if (!DBA::isResult($blocked)) {
return false;
}
if (Network::isUrlBlocked($blocked['url'])) {
return true;
}
return (bool) $blocked['blocked'];
}