Ejemplo n.º 1
0
def authenticate(username, password):
    user = User.find_by_username(username)
    if user and safe_str_cmp(user.password, password):
        return user
Ejemplo n.º 2
0
def authenticate(username, password):
    user = User.find_by_username(username)
    if user and password == user.password:  #OR if user is not None OR if user != None
        return user