From c62895a0b5d917d68dc7a5c1cb80ad508a89c11c Mon Sep 17 00:00:00 2001 From: Shafqat Farhan Date: Mon, 17 Jan 2022 03:52:11 +0500 Subject: [PATCH] feat: VAN-764 - Added email in marketing user information cookie --- openedx/core/djangoapps/user_authn/cookies.py | 1 + openedx/core/djangoapps/user_authn/tests/test_cookies.py | 1 + 2 files changed, 2 insertions(+) diff --git a/openedx/core/djangoapps/user_authn/cookies.py b/openedx/core/djangoapps/user_authn/cookies.py index 2c85fac76e5e..6283907d611d 100644 --- a/openedx/core/djangoapps/user_authn/cookies.py +++ b/openedx/core/djangoapps/user_authn/cookies.py @@ -268,6 +268,7 @@ def _get_user_info_cookie_data(request, user): user_info = { 'version': settings.EDXMKTG_USER_INFO_COOKIE_VERSION, 'username': user.username, + 'email': user.email, 'header_urls': header_urls, 'user_image_urls': image_urls, } diff --git a/openedx/core/djangoapps/user_authn/tests/test_cookies.py b/openedx/core/djangoapps/user_authn/tests/test_cookies.py index 37f26bf87e0d..fa7c536f09b3 100644 --- a/openedx/core/djangoapps/user_authn/tests/test_cookies.py +++ b/openedx/core/djangoapps/user_authn/tests/test_cookies.py @@ -110,6 +110,7 @@ def test_get_user_info_cookie_data(self): expected = { 'version': settings.EDXMKTG_USER_INFO_COOKIE_VERSION, 'username': self.user.username, + 'email': self.user.email, 'header_urls': self._get_expected_header_urls(), 'user_image_urls': self._get_expected_image_urls(), }