Hi Bjorn,

On a recent project I used e-mail addresses to log users in, it got a  
bit messy, but I created a new Backend [1] which was almost identical  
to the existing auth backend [2], but took and e-mail address and  
password. I also wrote custom logins [3], but I think that was for a  
different problem.

One thing of note is that e-mail address is not unique, however you  
could set the username to be a hash of the e-mail address as the  
username but this gets messy fast!

Good luck, John.


[1] <http://www.djangoproject.com/documentation/authentication/#other- 
authentication-sources>
[2] <http://code.djangoproject.com/browser/django/trunk/django/ 
contrib/auth/backends.py>
[3] <http://www.djangoproject.com/documentation/authentication/#how- 
to-log-a-user-in>

On 6 Aug 2006, at 11:58, Bjørn Stabell wrote:

>
> Hi,
>
> We'd like to use the email address as the username, but @'s not  
> allowed
> in usernames.  I was just wondering if there's a reason why usernames
> are restricted to alphanumeric characters only?
>
> We could, of course, just store the email address with @'s substituted
> with some other alphanumeric character instead, but that's a bit  
> hacky.
>
> Rgds,
> Bjorn
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to