Skip to content

Commit

Permalink
Making ready for the mobile signup form
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel authored and daniel committed Mar 7, 2020
1 parent f71bbdf commit 0e0a3ac
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion objects/captcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
if(!isset($global['systemRootPath'])){
require_once '../videos/configuration.php';
}
if(!empty($_GET['PHPSESSID'])){
session_write_close();
session_id($_GET['PHPSESSID']);
session_start();
}
class Captcha{
private $largura, $altura, $tamanho_fonte, $quantidade_letras;

Expand Down Expand Up @@ -57,9 +62,14 @@ static public function validation($word) {
session_start();
}
if(empty($_SESSION["palavra"])){
_error_log("Captcha validation Error: you type ({$word}) and session is empty");
return false;
}
return (strcasecmp($word, $_SESSION["palavra"]) == 0);
$validation = (strcasecmp($word, $_SESSION["palavra"]) == 0);
if(!$validation){
_error_log("Captcha validation Error: you type ({$word}) and session is ({$_SESSION["palavra"]})");
}
return $validation;
}

}

0 comments on commit 0e0a3ac

Please sign in to comment.