Commit f3debb72 by Mike Heald

Added required attributes for the backend to work with django 1.3

parent f1b86c84
...@@ -201,8 +201,10 @@ class OpenIDBackend: ...@@ -201,8 +201,10 @@ class OpenIDBackend:
"already in use for a different account." % nickname) "already in use for a different account." % nickname)
# Pick a username for the user based on their nickname, # Pick a username for the user based on their nickname,
# checking for conflicts. # checking for conflicts. Start with number of existing users who's
i = 1 # username starts with this nickname to avoid having to iterate over
# all of the existing ones.
i = User.objects.filter(username__startswith=nickname).count() + 1
while True: while True:
username = nickname username = nickname
if i > 1: if i > 1:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment