def verify_password(self, password, user):
        """
        Make it backward compatible to legacy password hash.
        In addition, if such password were found, update the user's password field.
        """
        verified = False
        hashed_password = self.get_password(user)

        try:
            verified = passwords.verify_password(self, password, hashed_password)
        except __HOLE__:
            legacy_check = self.legacy_check_password_hash
            if legacy_check:
                verified = legacy_check(hashed_password, password)
                if verified:
                    # update the hash
                    new_hash = self.hash_password(password)
                    self.update_password(user, new_hash)
        return verified
dataset/ETHPy150Open lingthio/Flask-User/flask_user/__init__.py/UserManager.verify_password