Skip to content

Commit

Permalink
feat!: pick drupal host during password reset (#451)
Browse files Browse the repository at this point in the history
Co-authored-by: Muhammad Faraz  Maqsood <[email protected]>
  • Loading branch information
Faraz32123 and Muhammad Faraz Maqsood authored Nov 17, 2023
1 parent b4f36c0 commit 4d4e482
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openedx/core/djangoapps/user_authn/views/password_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d4e482

Please sign in to comment.