fixing language issue for original activation email on sites using more than one language
https://openedx.atlassian.net/browse/CRI-217 https://discuss.openedx.org/t/activation-email-in-multiple-languages/2808
This commit is contained in:
@@ -214,6 +214,11 @@ def create_account_with_params(request, params):
|
||||
django_login(request, new_user)
|
||||
request.session.set_expiry(0)
|
||||
|
||||
# Sites using multiple languages need to record the language used during registration.
|
||||
# If not, compose_and_send_activation_email will be sent in site's default language only.
|
||||
create_or_set_user_attribute_created_on_site(user, request.site)
|
||||
preferences_api.set_user_preference(user, LANGUAGE_KEY, get_language())
|
||||
|
||||
# Check if system is configured to skip activation email for the current user.
|
||||
skip_email = _skip_activation_email(
|
||||
user, running_pipeline, third_party_provider,
|
||||
@@ -224,11 +229,6 @@ def create_account_with_params(request, params):
|
||||
else:
|
||||
compose_and_send_activation_email(user, profile, registration)
|
||||
|
||||
# Perform operations that are non-critical parts of account creation
|
||||
create_or_set_user_attribute_created_on_site(user, request.site)
|
||||
|
||||
preferences_api.set_user_preference(user, LANGUAGE_KEY, get_language())
|
||||
|
||||
if settings.FEATURES.get('ENABLE_DISCUSSION_EMAIL_DIGEST'):
|
||||
try:
|
||||
enable_notifications(user)
|
||||
|
||||
Reference in New Issue
Block a user