Ejemplo n.º 1
0
 public function checkCredentials($username, $password)
 {
     $user = $this->userRepository->findByUser($username);
     if ($user === false) {
         return false;
     }
     return $this->hash->check($password, $user->getHash(), $user->getSalt());
 }
Ejemplo n.º 2
0
 static function checkCredentials($username, $password)
 {
     $user = User::findByUser($username);
     if ($user === null) {
         return false;
     }
     return Hash::check($password, $user->getPasswordHash());
 }