mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Fix for spam checker
This commit is contained in:
parent
3ce6412a63
commit
e058c93b36
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user