modification pour afficher user par pseudo et non par id

This commit is contained in:
Yasder5 2026-02-19 21:10:24 +01:00
parent 190554d966
commit b11f67793a
9 changed files with 47 additions and 25 deletions

View file

@ -20,7 +20,7 @@
string $strEndDate='', int $intCategory=0, bool $bool6Months=false):array{
$strRq = "SELECT project.*,
CONCAT(user_firstname, ' ', user_name) AS 'project_creatorname',
user_pseudo AS 'project_creatorname',
user_image
FROM project
INNER JOIN users ON user_id = project_user_id";

View file

@ -162,4 +162,15 @@
return $prep->fetch();
}
public function findUserByPseudo(string $strPseudo): array|bool {
$strRq = "SELECT * FROM users WHERE user_pseudo = :pseudo";
$prep = $this->_db->prepare($strRq);
$prep->bindValue(':pseudo', $strPseudo, PDO::PARAM_STR);
$prep->execute();
return $prep->fetch();
}
}