No option for specifying username format

Bug #1157724 reported by Kanishk Dewan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
django-openid-auth
New
Undecided
Unassigned

Bug Description

When specifying the following setting to pick the username from email id:

OPENID_USE_EMAIL_FOR_USERNAME = True

I don't have an option to specify how the username should be formatted.
By default it just keeps all alphanumeric characters.

So for example if the email id of the user is:
    <email address hidden>

The username selected is:
    firstlastdomaincom

I want to be able to specify the format.

Currently I have to change line 157 in auth.py
From-
    suggestion = ''.join([x for x in email if x.isalnum()])
To-
    suggestion = email.split('@')[0]

So that I get only the username part.

For doing so I have to include the whole source code of django-openid-auth in my source code.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.