From bba10c6db44f707d18d631cf092fa762c600aad6 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 10 Dec 2018 15:28:08 +0100 Subject: [PATCH] core: set request.user after signup for audit --- passbook/core/views/authentication.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/passbook/core/views/authentication.py b/passbook/core/views/authentication.py index fc3ad28fd8..0d7915f21c 100644 --- a/passbook/core/views/authentication.py +++ b/passbook/core/views/authentication.py @@ -151,7 +151,7 @@ class SignUpView(UserPassesTestMixin, FormView): if self._invitation.fixed_username: initial['username'] = self._invitation.fixed_username if self._invitation.fixed_email: - initial['e-mail'] = self._invitation.fixed_email + initial['email'] = self._invitation.fixed_email return initial return super().get_initial() @@ -205,6 +205,7 @@ class SignUpView(UserPassesTestMixin, FormView): new_user.is_active = True new_user.set_password(data.get('password')) new_user.save() + request.user = new_user # Send signal for other auth sources user_signed_up.send( sender=SignUpView,