예제 #1
0
파일: server.py 프로젝트: joihn/TDDD97_Lab2
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    
예제 #2
0
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