diff options
author | Jack Morgan <jack.morgan@intel.com> | 2017-12-14 01:18:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-12-14 01:18:58 +0000 |
commit | 299e09f20562b918dc2c2e78cb082fe970f4e392 (patch) | |
tree | d9587ad6c7b55d77174589b2cd20220dc3a9eb41 /dashboard/src/account/views.py | |
parent | d962c79fa747f07e5b55bc13aa73698b0df7d26f (diff) | |
parent | 9f525b60709481427761c604a943f17dd5968e38 (diff) |
Merge "Integrate Initial Email Support"
Diffstat (limited to 'dashboard/src/account/views.py')
-rw-r--r-- | dashboard/src/account/views.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dashboard/src/account/views.py b/dashboard/src/account/views.py index 17fbdc3..e6a0e5d 100644 --- a/dashboard/src/account/views.py +++ b/dashboard/src/account/views.py @@ -119,6 +119,7 @@ class JiraAuthenticatedView(RedirectView): jira = JIRA(server=settings.JIRA_URL, oauth=oauth_dict) username = jira.current_user() + email = jira.user(username).emailAddress url = '/' # Step 3. Lookup the user or create them if they don't exist. try: @@ -130,6 +131,7 @@ class JiraAuthenticatedView(RedirectView): profile = UserProfile() profile.user = user profile.save() + user.userprofile.email_addr = email url = reverse('account:settings') user.userprofile.oauth_token = access_token['oauth_token'] user.userprofile.oauth_secret = access_token['oauth_token_secret'] |