Merge pull request #18928 from shadinaif/activation-email-to-ace
Convert Account Activation Emails to edx-ACE
This commit is contained in:
@@ -24,8 +24,8 @@ from openedx.core.djangoapps.password_policy import compliance as password_polic
|
||||
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
|
||||
from openedx.core.djangoapps.util.user_messages import PageLevelMessages
|
||||
from openedx.core.djangolib.markup import HTML, Text
|
||||
from student.models import LoginFailures
|
||||
from student.views import send_reactivation_email_for_user
|
||||
from student.models import LoginFailures, UserProfile
|
||||
from student.views import compose_and_send_activation_email
|
||||
from student.forms import send_password_reset_email_for_user
|
||||
from track import segment
|
||||
import third_party_auth
|
||||
@@ -163,7 +163,9 @@ def _log_and_raise_inactive_user_auth_error(unauthenticated_user):
|
||||
unauthenticated_user.username)
|
||||
)
|
||||
|
||||
send_reactivation_email_for_user(unauthenticated_user)
|
||||
profile = UserProfile.objects.get(user=unauthenticated_user)
|
||||
compose_and_send_activation_email(unauthenticated_user, profile)
|
||||
|
||||
raise AuthFailedError(_generate_not_activated_message(unauthenticated_user))
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ from openedx.core.djangoapps.user_authn.views.register import (
|
||||
REGISTRATION_AFFILIATE_ID, REGISTRATION_UTM_CREATED_AT, REGISTRATION_UTM_PARAMETERS,
|
||||
_skip_activation_email,
|
||||
)
|
||||
from openedx.core.djangoapps.ace_common.tests.mixins import EmailTemplateTagMixin
|
||||
from openedx.core.djangoapps.lang_pref import LANGUAGE_KEY
|
||||
from openedx.core.djangoapps.site_configuration.tests.mixins import SiteMixin
|
||||
from openedx.core.djangoapps.user_api.accounts import (
|
||||
@@ -87,7 +88,7 @@ def get_mock_pipeline_data(username=TEST_USERNAME, email=TEST_EMAIL):
|
||||
]
|
||||
}
|
||||
)
|
||||
class TestCreateAccount(SiteMixin, TestCase):
|
||||
class TestCreateAccount(EmailTemplateTagMixin, SiteMixin, TestCase):
|
||||
"""Tests for account creation"""
|
||||
|
||||
def setUp(self):
|
||||
|
||||
Reference in New Issue
Block a user