agree create 3
This commit is contained in:
parent
0e2901b62b
commit
163bda3e30
@ -5,6 +5,7 @@ from django.contrib.auth import login
|
|||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.shortcuts import render, redirect
|
from django.shortcuts import render, redirect
|
||||||
|
from django_saml2_pro_auth.auth import Backend
|
||||||
|
|
||||||
from rugwebsite.forms import RequestGDPRDelete, GDPRAgreeCreate
|
from rugwebsite.forms import RequestGDPRDelete, GDPRAgreeCreate
|
||||||
from rugwebsite.models import PendingGDPRAgree, GDPRAgreed, PendingGDPRDelete
|
from rugwebsite.models import PendingGDPRAgree, GDPRAgreed, PendingGDPRDelete
|
||||||
@ -46,7 +47,7 @@ def gdpr_create_agree(request):
|
|||||||
user.username, user.first_name, user.last_name, user.email = json.loads(data)
|
user.username, user.first_name, user.last_name, user.email = json.loads(data)
|
||||||
user.is_active = True
|
user.is_active = True
|
||||||
user.save()
|
user.save()
|
||||||
login(request, user, backend=None)
|
login(request, user, backend=Backend)
|
||||||
|
|
||||||
return render(request, 'rugwebsite/gdpr_agree_success.html', {'shownav': True})
|
return render(request, 'rugwebsite/gdpr_agree_success.html', {'shownav': True})
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user