agree create 3
This commit is contained in:
parent
163bda3e30
commit
42444c12dc
@ -8,5 +8,3 @@ urlpatterns = [
|
||||
url(r'', include(saml_urls, namespace='saml')),
|
||||
url(r'$', home),
|
||||
]
|
||||
|
||||
import django.contrib.auth
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user