aboutsummaryrefslogtreecommitdiffstats
path: root/src/account/views.py
diff options
context:
space:
mode:
authorJack Morgan <jack.morgan@intel.com>2017-12-14 01:18:58 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-12-14 01:18:58 +0000
commite0edcd4c99f6bcdda93c198a1e5829d1e929e0ec (patch)
tree9840f0616b3768711ddb3109bce5c5756748f46e /src/account/views.py
parent1b9e76a483822a830a1b67acb817467ee907b93c (diff)
parent9742d5a8d6ee629e99581dc69c491a04f6a2f2ac (diff)
Merge "Integrate Initial Email Support"
Diffstat (limited to 'src/account/views.py')
-rw-r--r--src/account/views.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/account/views.py b/src/account/views.py
index 17fbdc3..e6a0e5d 100644
--- a/src/account/views.py
+++ b/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']