$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; include_once($configPath); $error = true; if ((!empty($_POST["email"]) && tokenVerify())) { $bind = array(); $sql = "SELECT codice, email, attivo FROM b_utenti WHERE (tentativi > 4 OR scaduto = 'S') AND email = :email"; $bind[":email"] = $_POST["email"]; $ris = $pdo->go($sql,$bind); if ($ris->rowCount()===1) { $record = $ris->fetch(PDO::FETCH_ASSOC); $tmp = array(); $tmp["codice"] = $record["codice"]; $tmp["unlock_request"] = date("Y-m-d H:m:i"); $tmp["unlock_token"] = tokenGen(); $salva = new salva(); $salva->debug = false; $salva->nome_tabella = "b_utenti"; $salva->operazione = "UPDATE"; $salva->oggetto = $tmp; if ($salva->save() > 0) { $link = $_SESSION["config"]["link_sito"] . "/profilo/unlock-usr.php?email=" . base64_encode($record["email"]) . "&token=" . base64_encode($tmp["unlock_token"]); $link = "".$link.""; $oggetto = __("Sblocca utenza"); $messaggio = "