Merge pull request #12488 from edx/asadiqbal08/WL-477

Got two thumbs up, so merging. 
WL-477 Route direct references to email address configurations through theming.helpers
This commit is contained in:
Asad Iqbal
2016-05-23 17:56:28 +05:00
10 changed files with 43 additions and 18 deletions

View File

@@ -33,6 +33,7 @@ from .serializers import (
AccountLegacyProfileSerializer, AccountUserSerializer,
UserReadOnlySerializer, _visible_fields # pylint: disable=invalid-name
)
from openedx.core.djangoapps.theming import helpers as theming_helpers
# Public access point for this function.
@@ -397,7 +398,7 @@ def request_password_change(email, orig_host, is_secure):
# Generate a single-use link for performing a password reset
# and email it to the user.
form.save(
from_email=settings.DEFAULT_FROM_EMAIL,
from_email=theming_helpers.get_value('default_from_email', settings.DEFAULT_FROM_EMAIL),
domain_override=orig_host,
use_https=is_secure
)