(cls, username, password)
return None
Returns a `User` object for which `username` and `password` are
        correct, otherwise ``None``.
Returns a `User` object for which `username` and `password` are
        correct, otherwise ``None``.
Returns a User object for which username and password are correct otherwise None .
def login(cls, username, password):
        """
        Returns a `User` object for which `username` and `password` are
        correct, otherwise ``None``.
        """
        u = cls.by_username(username)
        if u and u.password == cls._hash_password(password, u.salt):
            return u
        return None
def login ( cls , username , password ) : u = cls . by_username ( username ) if u and u . password == cls . _hash_password ( password , u . salt ) : return u return None