Commit 72261daa by Michael Hall

Add new option to README.txt and removed an unecessary check in _get_available_username()

parent f6107f42
......@@ -125,3 +125,14 @@ If you require openid authentication into the admin application, add the followi
It is worth noting that a user needs to be be marked as a "staff user" to be able to access the admin interface. A new openid user will not normally be a "staff user".
The easiest way to resolve this is to use traditional authentication (OPENID_USE_AS_ADMIN_LOGIN = False) to sign in as your first user with a password and authorise your
openid user to be staff.
== Change Django usernames if the nickname changes on the provider ==
If you want your Django username to change when a user updates the nickname on their provider, add the following setting:
OPENID_FOLLOW_RENAMES = True
If the new nickname is available as a Django username, the user is renamed.
Otherwise the user will be renamed to nickname+i for an incrememnting value of i until no conflict occurs.
If the user has already been renamed to nickname+1 due to a conflict, and the nickname is still not available, the user will keep their existing username.
......@@ -176,10 +176,6 @@ class OpenIDBackend:
username += str(i)
try:
user = User.objects.get(username__exact=username)
if user.useropenid_set.filter(claimed_id__exact=identity_url).count() > 0:
# username already belongs to this openid user, so it's okay
return username
except User.DoesNotExist:
break
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