Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def register(request):
- if request.method == 'POST':
- form = UserRegisterForm(request.POST)
- if form.is_valid():
- form.save()
- form_data = form.cleaned_data
- username = form_data.get('username')
- raw_password = form_data.get('password1')
- user = authenticate(username=username, password=raw_password)
- user.is_active = False
- if user.is_active == False:
- user.email_confirmed = False
Add Comment
Please, Sign In to add comment