so, if it was not in database is result None, or some err or how to 
validate? sorry I am very beginner ;-)

then same problem with that permission, how to verify if reason for failing 
was that?

-thanks

perjantai 16. tammikuuta 2015 18.25.29 UTC+2 Shazwi Suwandi kirjoitti:
>
> Have you tried something like *user = 
> User.objects.get(username="username")*
>
> On Saturday, 17 January 2015 00:00:32 UTC+8, joulumaa wrote:
>>
>> Hi,
>>    
>> If  user = auth.authenticate(username,password) results None, I would 
>> like to create new user and login it.
>> But I cannot find a way to determine easily if it is was None because of 
>> 1) it was not in database or 2) it was in database but password was wrong
>> I addition to those it may have been inActive or without permission, but 
>> first thing to check would be to find if username is in user database.
>> Is there any fast way to check it?
>>
>> -thanks for help
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a4146e09-3e68-4ece-bd50-feb77c34821c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to