Commit 7b825b9f authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

too early expiration

parent 32e54282
......@@ -80,6 +80,7 @@ class HumanVerification
# If the user is locked we will force a Captcha validation
if ($user->isLocked()) {
$user->saveUser();
\App\Http\Controllers\HumanVerification::logCaptcha($request);
\app()->make(QueryTimer::class)->observeEnd(self::class);
$this->logCaptcha($request); // TODO remove
......
......@@ -157,4 +157,11 @@ class HumanVerification
$verificator->verifyUser();
}
}
public function saveUser()
{
foreach ($this->verificators as $verificator) {
$verificator->saveUser();
}
}
}
......@@ -75,6 +75,9 @@ abstract class Verification
function lockUser()
{
if ($this->user["unusedResultPages"] === 0) {
$this->user["unusedResultPages"] = 1;
}
$this->user["locked"] = true;
$this->saveUser();
}
......
Supports Markdown
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