Correction envoie mail
This commit is contained in:
parent
8b094379ca
commit
e3d85f7946
4 changed files with 32 additions and 11 deletions
|
|
@ -37,9 +37,15 @@
|
|||
|
||||
$strRq = "SELECT user_id, user_name, user_firstname, user_password, user_image, user_status, authorisation_name, user_pseudo
|
||||
FROM users INNER JOIN authorisation ON authorisation.authorisation_id = users.user_status
|
||||
WHERE user_mail = '".$strMail."'";
|
||||
WHERE user_mail = :mail";
|
||||
|
||||
$rqPrep = $this->_db->prepare($strRq);
|
||||
$rqPrep->bindValue(":mail", $strMail, PDO::PARAM_STR);
|
||||
$rqPrep->execute();
|
||||
|
||||
|
||||
|
||||
$arrUser = $this->_db->query($strRq)->fetch();
|
||||
$arrUser = $rqPrep->fetch();
|
||||
if (password_verify($strPwd, $arrUser['user_password'])){
|
||||
unset($arrUser['user_password']);
|
||||
return $arrUser;
|
||||
|
|
@ -236,7 +242,7 @@
|
|||
/**
|
||||
* Verifie sur le pseudo entré n'est pas déjà utilisé
|
||||
* @param string $pseudo Pseudo a verifié
|
||||
* @return array Tableau associatif (ou false si pas trouvé)
|
||||
* @return bool Le pseudo existe ou pas
|
||||
*/
|
||||
public function pseudoExists(string $pseudo): bool{
|
||||
|
||||
|
|
@ -244,6 +250,6 @@
|
|||
$rq->bindValue(":pseudo", $pseudo, PDO::PARAM_STR);
|
||||
$rq->execute();
|
||||
|
||||
return $rq->fetchColumn();
|
||||
return (bool)$rq->fetchColumn();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue