auth_fc: provision user's informations on registration (#72358)
This commit is contained in:
parent
5dddd1c674
commit
9e7e6dcfba
|
@ -491,6 +491,7 @@ class LoginOrLinkView(View):
|
|||
user.delete()
|
||||
raise
|
||||
else:
|
||||
self.update_user_info(user, user_info)
|
||||
if created:
|
||||
logger.info('auth_fc: new account "%s" created with FranceConnect sub "%s"', user, sub)
|
||||
hooks.call_hooks('event', name='fc-create', user=user, sub=sub, request=request)
|
||||
|
|
|
@ -126,7 +126,7 @@ def test_create(settings, app, franceconnect, hooks, service, mailoutbox):
|
|||
assert len(mailoutbox) == 1
|
||||
assert mailoutbox[0].subject == 'Account creation using FranceConnect'
|
||||
for body in (mailoutbox[0].body, mailoutbox[0].alternatives[0][0]):
|
||||
assert 'Hi john.doe@example.com,' in body
|
||||
assert 'Hi Ÿuñe Frédérique,' in body
|
||||
assert 'You have just created an account using FranceConnect.' in body
|
||||
assert 'https://testserver/login/' in body
|
||||
|
||||
|
|
Loading…
Reference in New Issue