Re: auth system - check if user already exists

2007-08-06 Thread Aljosa Mohorovic
On Aug 6, 4:55 pm, LaundroMat <[EMAIL PROTECTED]> wrote: > Are you sure you want to avoid that? I remember somebody here linking > to an article where this wasn't advised, because it's (apparently) > quite common for members of the same household to register with the > same e-mail address (but

Re: auth system - check if user already exists

2007-08-06 Thread LaundroMat
Are you sure you want to avoid that? I remember somebody here linking to an article where this wasn't advised, because it's (apparently) quite common for members of the same household to register with the same e-mail address (but with another username ofcourse). On Aug 6, 12:02 pm, Aljosa

Re: auth system - check if user already exists

2007-08-06 Thread Aljosa Mohorovic
i'm checking username and email because i want to avoid situations where some user registers with same email using different username. Aljosa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: auth system - check if user already exists

2007-08-06 Thread LaundroMat
Of the top of my head, but would the following be helpful? user, new = User.objects.get_or_create(username = user, email = email) The function returns either: - a new user object and True if the user didn't exist yet (and had to be created); - an object with existing user data and False. Mind

Re: auth system - check if user already exists

2007-08-05 Thread Poromenos
That's what I do (well, I just check the username, since I can't think why you'd want to check the email). I don't think there's a better way, it's pretty straightforward... Poromenos On Aug 6, 12:42 am, Aljosa Mohorovic <[EMAIL PROTECTED]> wrote: > i'm currently looking at django.contrib.auth