Seems password has to be set with set_password...

This commit is contained in:
Magnus Hagander
2009-09-16 17:08:15 +02:00
parent 322da0de7e
commit 4f91ae9cc2

View File

@ -30,7 +30,8 @@ class AuthBackend(ModelBackend):
# Value 1 in field 1 means the login succeeded. In this case, # Value 1 in field 1 means the login succeeded. In this case,
# create a user in the django system, and migrate all settings # create a user in the django system, and migrate all settings
# we can think of. # we can think of.
user = User(username=username, password=password, email=rows[0][3], first_name=rows[0][2]) user = User(username=username, email=rows[0][3], first_name=rows[0][2])
user.set_password(password)
user.save() user.save()
return user return user
# Any other value in field 1 means login failed, so tell django we did # Any other value in field 1 means login failed, so tell django we did