From 601b1238184ae2fabfea3baa74ba877a35b814e5 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 24 Jul 2018 21:32:30 +0300 Subject: [PATCH] Ignore Apple's IP --- app/Ninja/Repositories/AccountRepository.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Ninja/Repositories/AccountRepository.php b/app/Ninja/Repositories/AccountRepository.php index 4ae38eea93..33e9be2ba8 100644 --- a/app/Ninja/Repositories/AccountRepository.php +++ b/app/Ninja/Repositories/AccountRepository.php @@ -132,6 +132,12 @@ class AccountRepository private function checkForSpammer() { $ip = Request::getClientIp(); + + // Apple's IP for their test accounts + if ($ip == '17.200.11.44') { + return; + } + $count = Account::whereIp($ip)->whereHas('users', function ($query) { $query->whereRegistered(true); })->count();