def passwordOK(name, password):
    if accountExists(name):
        query = database.sendQuery("SELECT * FROM accounts WHERE username='%s';" % name)
        rows = query.fetchone()

        if password == rows[2]:
            return True
dataset/ETHPy150Open marcusmoller/pyorpg-server/src/database.py/passwordOK/original