Ajustement de la partie ajout/modif/suppression des projets

This commit is contained in:
Guillaume HESS 2026-02-26 16:24:47 +01:00
parent 80dcaee91c
commit a846fa104f
7 changed files with 31 additions and 29 deletions

View file

@ -80,13 +80,16 @@
date('Y-m-d H:i:s', time() + (15*24*60*60))
, PDO::PARAM_STR);
return $rqPrep->execute();
}
public function getTokenUser(string $hash){
$strRq = $this->_db->prepare("SELECT token_user_id FROM tokens WHERE token_hash = :hash AND token_expire_at > NOW()");
$strRq->execute(['hash' => $hash]);
return $strRq->fetch();
}
public function deleteToken(string $hash){
$strRq = $this->_db->prepare("DELETE FROM tokens WHERE token_hash = :hash");
return $strRq->execute(['hash' => $hash]);