def validLogin(email, password): passwordHash = database_helper.getUserPasswordByEmail(email) if passwordHash is None: return False else: if bcrypt.check_password_hash(passwordHash, password): return True else: return False
def validLogin(email, password): """Returns true if the password matches the password hash stored in the database for a user.""" passwordHash = database_helper.getUserPasswordByEmail(email) if passwordHash is None: return False else: if bcrypt.check_password_hash(passwordHash, password): return True else: return False