From 2848436c8f62be8ef5e4efd09f1a80eceead7ef7 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Fri, 17 Nov 2023 14:38:52 +0500 Subject: [PATCH] feat!: pick drupal host during password reset --- openedx/core/djangoapps/user_authn/views/password_reset.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/user_authn/views/password_reset.py b/openedx/core/djangoapps/user_authn/views/password_reset.py index f8049d4d914c..5cb0e7ac79f9 100644 --- a/openedx/core/djangoapps/user_authn/views/password_reset.py +++ b/openedx/core/djangoapps/user_authn/views/password_reset.py @@ -149,8 +149,12 @@ def send_password_reset_email_for_user(user, request, preferred_email=None): preferred_email (str): Send email to this address if present, otherwise fallback to user's email address. """ message_context, user_language_preference = get_user_default_email_params(user) - site_name = settings.AUTHN_MICROFRONTEND_DOMAIN if should_redirect_to_authn_microfrontend() \ + site_name = ( + configuration_helpers.get_value('DRUPAL_HOST', settings.DRUPAL_HOST) + or settings.AUTHN_MICROFRONTEND_DOMAIN + if should_redirect_to_authn_microfrontend() else configuration_helpers.get_value('SITE_NAME', settings.SITE_NAME) + ) message_context.update({ 'request': request, # Used by google_analytics_tracking_pixel # TODO: This overrides `platform_name` from `get_base_template_context` to make the tests passes