Commit b667ff78 authored by Dominik Hebeler's avatar Dominik Hebeler

fixed an error in situations with multiple users on the same ip

parent bc05d9d9
......@@ -113,7 +113,6 @@ class HumanVerification extends Controller
}
$userList[$user["uid"]] = $user;
Cache::put(HumanVerification::PREFIX . "." . $user["id"], $userList, now()->addWeeks(2));
dd($user);
}
private static function deleteUser($user)
......
......@@ -66,15 +66,16 @@ class HumanVerification
} else {
$user = $users[$uid];
}
# Lock out everyone in a Bot network
# Find out how many requests this IP has made
$sum = 0;
// Defines if this is the only user using that IP Adress
$alone = true;
foreach ($users as $uid => $userTmp) {
foreach ($users as $uidTmp => $userTmp) {
if (!$userTmp["whitelist"]) {
$sum += $userTmp["unusedResultPages"];
if ($userTmp["uid"] != $uid) {
if ($userTmp["uid"] !== $uid) {
$alone = false;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment