Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change host from lms to drupal for email change template #524

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading