From 33fdf1a0037319da96f6f9aac670bc57e2bd72d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 20 Oct 2020 19:06:05 +0200 Subject: [PATCH] create temporary user with an invalid & random email address (authentic doesn't allow None to be used anymore) --- src/authentic2_auth_fedict/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/authentic2_auth_fedict/views.py b/src/authentic2_auth_fedict/views.py index 9e78a68..6dfe1e9 100644 --- a/src/authentic2_auth_fedict/views.py +++ b/src/authentic2_auth_fedict/views.py @@ -14,6 +14,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +import random + from django.core import signing from django.urls import reverse from django.db import transaction @@ -59,7 +61,7 @@ class LoginView(mellon.views.LoginView): user.is_active = False user.save() data = {} - data['email'] = None + data['email'] = 'adresse@email.invalid#%s' % random.randint(0, 10000000) data['confirm_data'] = True data['valid_email'] = False data['skip_email_check'] = True