How to set is_active=False in Django UserCreationForm

86 views
Skip to first unread message

Md. Mizanur Rahman Khan

unread,
Jan 1, 2018, 6:30:03 AM1/1/18
to Django Social Auth
I want to do email verification while creating a user in django using "from django.contrib.auth.forms import UserCreationForm". When a user register into my site then a user will be created but his active status will be false. And a verification code will be sent to his email address, when he enters the verification code his account will be activated. 

 For this is I want to set:

 **is_active = False**

And when he enters the verification code, it will be set as:
**is_active = True**

But the default value of **is_active = True**. So how I can make it **False**? 
Reply all
Reply to author
Forward
0 new messages