Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
45 righe
1.7 KiB
45 righe
1.7 KiB
<? |
|
if (!empty($root) && isset($_SESSION["utente"])) { |
|
if ($_SESSION["utente"]->TwoFactorVerify()) { |
|
$sql = "SELECT * FROM b_password_log WHERE codice_utente = :codice_utente ORDER BY timestamp DESC LIMIT 0,1"; |
|
$ris = $pdo->go($sql,array(":codice_utente"=>$_SESSION["utente"]->codice)); |
|
$last_change = "0000-00-00"; |
|
if ($ris->rowCount() == 1) { |
|
$last_change = $ris->fetch(PDO::FETCH_ASSOC); |
|
if (!empty($last_change)) { |
|
$last_change = $last_change["timestamp"]; |
|
} |
|
} |
|
$limit = strtotime("-6 month"); |
|
$last_change = strtotime(substr($last_change,0,10)); |
|
if ($last_change < $limit) { |
|
$_SESSION["expired_pass"] = true; |
|
if (empty($change_pwd) && !isset($unitTestExecution)) { |
|
echo '<meta http-equiv="refresh" content="0;URL=/profilo/change_pwd.php?expired=true">'; |
|
die(); |
|
} |
|
} |
|
if ($_SESSION["utente"]->gerarchia < 99 && $_SESSION["utente"]->gerarchia > 9) { |
|
if (empty($_SESSION["utente"]->collaborazione)) { |
|
echo '<meta http-equiv="refresh" content="0;URL=/profilo/selectCollaborazione.php">'; |
|
die(); |
|
} |
|
} |
|
} else { |
|
$_SESSION["expired_pass"] = true; |
|
if (empty($change_pwd)) { |
|
echo '<meta http-equiv="refresh" content="0;URL=/profilo/2faLogin.php">'; |
|
die(); |
|
} |
|
} |
|
if (empty($change_pwd) && !empty($_SESSION["utente"]->oe)) { |
|
if ($_SESSION["ente"]->getInfo()["profilo_completo_oe"] == "S" && $_SESSION["utente"]->oe["profilo_completo"] == "N") { |
|
if (in_array($_SERVER["PHP_SELF"],["/oe/index.php"]) === false) { |
|
echo '<meta http-equiv="refresh" content="0;URL=/oe/index.php">'; |
|
die(); |
|
} |
|
} |
|
} |
|
} |
|
|
|
?>
|
|
|