Advertisement
Guest User

Untitled

a guest
Dec 1st, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1.    public function loginTest($username, $password)
  2.     {
  3.  
  4.          
  5.  
  6.         $user = $this->fetch("SELECT * FROM {$this->table} WHERE username = :username", [
  7.             'username' => $username,
  8.            
  9.         ]);
  10.         if($verifiedPassword = password_verify($password, $user['password'])){
  11.             return $user;
  12.         }
  13.         else{
  14.             echo 'Wrong username or password';
  15.         }
  16.        
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement