Removed logging events
This commit is contained in:
parent
066e26fbe1
commit
65c2254b0c
1 changed files with 0 additions and 5 deletions
|
@ -88,7 +88,6 @@ class CaptchaManager
|
||||||
// Return false if the captcha does not exist
|
// Return false if the captcha does not exist
|
||||||
if(!self::captchaExists($peer_uuid))
|
if(!self::captchaExists($peer_uuid))
|
||||||
{
|
{
|
||||||
Logger::getLogger()->warning(sprintf("The requested captcha does not exist for the peer %s", $peer_uuid));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,25 +96,21 @@ class CaptchaManager
|
||||||
// Return false if the captcha has already been solved
|
// Return false if the captcha has already been solved
|
||||||
if($captcha->getStatus() === CaptchaStatus::SOLVED)
|
if($captcha->getStatus() === CaptchaStatus::SOLVED)
|
||||||
{
|
{
|
||||||
Logger::getLogger()->warning(sprintf("The requested captcha has already been solved for the peer %s", $peer_uuid));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return false if the captcha is older than 5 minutes
|
// Return false if the captcha is older than 5 minutes
|
||||||
if ($captcha->isExpired())
|
if ($captcha->isExpired())
|
||||||
{
|
{
|
||||||
Logger::getLogger()->warning(sprintf("The requested captcha is older than 5 minutes for the peer %s", $peer_uuid));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify the answer
|
// Verify the answer
|
||||||
if($captcha->getAnswer() !== $answer)
|
if($captcha->getAnswer() !== $answer)
|
||||||
{
|
{
|
||||||
Logger::getLogger()->warning(sprintf("The answer to the requested captcha is incorrect for the peer %s", $peer_uuid));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::getLogger()->debug(sprintf("The answer to the requested captcha is correct for the peer %s", $peer_uuid));
|
|
||||||
$statement = Database::getConnection()->prepare("UPDATE captcha_images SET status='SOLVED', answered=NOW() WHERE peer_uuid=?");
|
$statement = Database::getConnection()->prepare("UPDATE captcha_images SET status='SOLVED', answered=NOW() WHERE peer_uuid=?");
|
||||||
$statement->bindParam(1, $peer_uuid);
|
$statement->bindParam(1, $peer_uuid);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue