Correction envoie mail
This commit is contained in:
parent
8b094379ca
commit
e3d85f7946
4 changed files with 32 additions and 11 deletions
|
|
@ -22,10 +22,18 @@
|
|||
FROM category";
|
||||
|
||||
if ($intLimit > 0){
|
||||
$strRq .= " LIMIT ".$intLimit;
|
||||
$strRq .= " LIMIT :limit";
|
||||
}
|
||||
|
||||
return $this->_db->query($strRq)->fetchAll();
|
||||
$rqPrep = $this->_db->prepare($strRq);
|
||||
|
||||
if ($intLimit > 0){
|
||||
$rqPrep->bindValue(":limit", $intLimit, PDO::PARAM_INT);
|
||||
}
|
||||
|
||||
$rqPrep->execute();
|
||||
|
||||
return $rqPrep->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,11 +22,18 @@
|
|||
$strRq = "SELECT image.*
|
||||
FROM image";
|
||||
|
||||
if ($intLimit > 0){
|
||||
$strRq .= " LIMIT :limit";
|
||||
}
|
||||
|
||||
$rqPrep = $this->_db->prepare($strRq);
|
||||
|
||||
if ($intLimit > 0){
|
||||
$strRq .= " LIMIT ".$intLimit;
|
||||
$rqPrep->bindValue(":limit", $intLimit, PDO::PARAM_INT);
|
||||
}
|
||||
|
||||
return $this->_db->query($strRq)->fetchAll();
|
||||
$rqPrep->execute();
|
||||
|
||||
return $rqPrep->fetchAll();
|
||||
}
|
||||
}
|
||||
|
|
@ -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";
|
||||
|
||||
$arrUser = $this->_db->query($strRq)->fetch();
|
||||
$rqPrep = $this->_db->prepare($strRq);
|
||||
$rqPrep->bindValue(":mail", $strMail, PDO::PARAM_STR);
|
||||
$rqPrep->execute();
|
||||
|
||||
|
||||
|
||||
$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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@
|
|||
</section>
|
||||
|
||||
|
||||
<!-- Formulaire qui envoie la demande au contrôleur (shareProject) -->
|
||||
<!-- Formulaire qui envoie la demande au contrôleur (sendEmail) -->
|
||||
<div class="card shadow-sm p-4 mb-5">
|
||||
<form method="post" action="index.php?ctrl=project&action=shareProject">
|
||||
<form method="post" action="index.php?ctrl=project&action=sendEmail">
|
||||
|
||||
<input type="hidden" name="project_id"
|
||||
value="{$objProject->getId()}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue