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