We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 636fbd7 + 00e0b1f commit b556ed0Copy full SHA for b556ed0
lib/omniauth/strategies/bitbucket.rb
@@ -30,8 +30,9 @@ class Bitbucket < OmniAuth::Strategies::OAuth
30
def raw_info
31
@raw_info ||= begin
32
ri = MultiJson.decode(access_token.get('/api/1.0/user').body)['user']
33
- email = (MultiJson.decode(access_token.get('/api/1.0/emails').body).find { |email| email['primary'] })['email']
34
- ri.merge('email' => email) if email
+ email = MultiJson.decode(access_token.get('/api/1.0/emails').body).find { |email| email['primary'] }
+ ri.merge!('email' => email['email']) if email
35
+ ri
36
end
37
38
0 commit comments