agree create 3

This commit is contained in:
H.T. Kruitbosch 2018-05-04 16:54:26 +02:00
parent c82c23aac4
commit df900898e8

View File

@ -51,8 +51,9 @@ def gdpr_create_agree(request):
assert request.user.is_authenticated(), "User should be authenticated."
data = json.dumps([request.user.username, request.user.first_name, request.user.last_name, request.user.email])
sha256 = hashlib.sha256()
request.session['samlPersoonsgegevensHash'] = sha256.hexdigest()
sha256.update(data.encode('utf-8'))
request.user.delete()
request.session['samlPersoonsgegevensHash'] = sha256.hexdigest()
form = GDPRAgreeCreate(initial={'data': data})
return render(request, 'rugwebsite/gdpr.html', {'created': True, 'shownav': True, 'form': form})