Fix MysqlAuthUser when number of results != 1, typo in README

This commit is contained in:
Valentin Samir
2015-12-19 17:14:02 +01:00
parent 43ae81fdb3
commit 494da62935
2 changed files with 4 additions and 2 deletions

View File

@ -83,7 +83,9 @@ class MysqlAuthUser(AuthUser):
curs = conn.cursor()
if curs.execute(settings.CAS_SQL_USER_QUERY, (username,)) == 1:
self.user = curs.fetchone()
super(MysqlAuthUser, self).__init__(self.user['username'])
super(MysqlAuthUser, self).__init__(self.user['username'])
else:
super(MysqlAuthUser, self).__init__(username)
def test_password(self, password):
"""test `password` agains the user"""