agree create 3

This commit is contained in:
H.T. Kruitbosch 2018-05-04 17:14:46 +02:00
parent 163bda3e30
commit 42444c12dc
2 changed files with 2 additions and 3 deletions

View File

@ -8,5 +8,3 @@ urlpatterns = [
url(r'', include(saml_urls, namespace='saml')),
url(r'$', home),
]
import django.contrib.auth

View File

@ -5,6 +5,7 @@ from django.contrib.auth import login
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.shortcuts import render, redirect
from django.utils.module_loading import import_string
from django_saml2_pro_auth.auth import Backend
from rugwebsite.forms import RequestGDPRDelete, GDPRAgreeCreate
@ -47,7 +48,7 @@ def gdpr_create_agree(request):
user.username, user.first_name, user.last_name, user.email = json.loads(data)
user.is_active = True
user.save()
login(request, user, backend=Backend)
login(request, user, backend=import_string('django_saml2_pro_auth.auth.Backend'))
return render(request, 'rugwebsite/gdpr_agree_success.html', {'shownav': True})
else: