Projet

Général

Profil

0001-emails-always-provide-a-site-variable-32789.patch

Thomas Noël, 04 septembre 2019 15:06

Télécharger (1,23 ko)

Voir les différences:

Subject: [PATCH] emails: always provide a site variable (#32789)

 src/authentic2/utils/__init__.py | 2 ++
 1 file changed, 2 insertions(+)
src/authentic2/utils/__init__.py
778 778
        'user': user,
779 779
        'email': user.email,
780 780
        'expiration_days': settings.PASSWORD_RESET_TIMEOUT_DAYS,
781
        'site': request.get_host() if request else '',
781 782
    })
782 783

  
783 784
    # Build reset URL
......
1074 1075
        'old_email': user.email,
1075 1076
        'user': user,
1076 1077
        'link': link,
1078
        'site': request.get_host(),
1077 1079
        'domain': request.get_host(),
1078 1080
        'token_lifetime': human_duration(app_settings.A2_EMAIL_CHANGE_TOKEN_LIFETIME),
1079 1081
        'password_reset_url': request.build_absolute_uri(reverse('password_reset')),
1080
-