/** * Verify a password. * * @param string $password * @param string $hash * @param UserModel $user * * @return boolean */ public function verifyPassword($password, $hash, $user = null) { if (strlen($hash) === 0) { return $this->legacyService->checkPassword($user, $password, $this->bcrypt); } if ($this->bcrypt->verify($password, $hash)) { return true; } return false; }