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

@ -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();
}
}