Skip to content

Commit

Permalink
change host from lms to drupal for email change template (#524)
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 Mar 8, 2024
1 parent f92cf17 commit 71fad04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/djangoapps/student/views/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,12 +755,15 @@ def do_email_change_request(user, new_email, activation_key=None, secondary_emai

site = Site.objects.get_current()
message_context = get_base_template_context(site)
drupal_host = configuration_helpers.get_value('DRUPAL_HOST', settings.DRUPAL_HOST)
site_name = configuration_helpers.get_value('SITE_NAME', settings.SITE_NAME)
site = (drupal_host or site_name) if not secondary_email_change_request else site_name
message_context.update({
'old_email': user.email,
'new_email': new_email,
'confirm_link': '{protocol}://{site}{link}'.format(
protocol='https' if use_https else 'http',
site=configuration_helpers.get_value('SITE_NAME', settings.SITE_NAME),
site=site,
link=confirm_link,
),
})
Expand Down

0 comments on commit 71fad04

Please sign in to comment.