From 9424b55046df910c8a75c5caf699474b8f7e9541 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 9 Jul 2014 22:23:49 -0700 Subject: [PATCH] bitbucket now checking for email on login --- plugin/remote/bitbucket/bitbucket.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/remote/bitbucket/bitbucket.go b/plugin/remote/bitbucket/bitbucket.go index 300becc07..1c49e0f9c 100644 --- a/plugin/remote/bitbucket/bitbucket.go +++ b/plugin/remote/bitbucket/bitbucket.go @@ -132,6 +132,11 @@ func (b *Bitbucket) GetLogin(w http.ResponseWriter, r *http.Request) (*remote.Lo Name: user.User.DisplayName, } + email, _ := client.Emails.FindPrimary(user.User.Username) + if email != nil { + login.Email = email.Email + } + return &login, nil }