Advertisement
Kiporralixo

Untitled

Jun 12th, 2017
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. ███████████████████ METODO DE LOGIN ███████████████████*/
  2. public function fazer_login($cliente, $senha){
  3. try{
  4. if($this->validar_senha($cliente, $senha) === true){
  5. $query = "SELECT * FROM clientes WHERE email = :email";
  6. $this->Select = $this->Conn->prepare($query);
  7. $this->Select->BindValue(':email', $cliente->getEmail(), PDO::PARAM_STR);
  8. $this->Select->execute();
  9. if($this->Select->rowCount() == 1){
  10. return $this->Select->fetch(PDO::FETCH_ASSOC);
  11. }else{
  12. return false;
  13. }
  14. }else{
  15. return "Senha Invalida!";
  16. }
  17. } catch (PDOException $ex) {
  18. exibeMensagens($Msg, $ErrNo);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement