Fix for spam checker

This commit is contained in:
Hillel Coren 2018-03-18 16:46:55 +02:00
parent 3ce6412a63
commit e058c93b36

View File

@ -129,7 +129,9 @@ class AccountRepository
private function checkForSpammer()
{
$ip = Request::getClientIp();
$count = Account::whereIp($ip)->count();
$count = Account::whereIp($ip)->whereHas('users', function ($query) {
$query->whereConfirmed(true);
})->count();
if ($count > 1 && $errorEmail = env('ERROR_EMAIL')) {
\Mail::raw($ip, function ($message) use ($ip, $errorEmail) {