mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for spam checker
This commit is contained in:
parent
ab2c819423
commit
8a2d6c2dd5
@ -129,7 +129,9 @@ class AccountRepository
|
|||||||
private function checkForSpammer()
|
private function checkForSpammer()
|
||||||
{
|
{
|
||||||
$ip = Request::getClientIp();
|
$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')) {
|
if ($count > 1 && $errorEmail = env('ERROR_EMAIL')) {
|
||||||
\Mail::raw($ip, function ($message) use ($ip, $errorEmail) {
|
\Mail::raw($ip, function ($message) use ($ip, $errorEmail) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user