Skip to content

Commit 77cfd54

Browse files
committed
Merge pull request #25 from cloud66/master
Private email is not returned if the public one is blank
2 parents 6125034 + da73459 commit 77cfd54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/omniauth/strategies/github.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def raw_info
4848
end
4949

5050
def email
51-
raw_info['email'] || primary_email
51+
(raw_info['email'].nil? || raw_info['email'].empty?) ? primary_email : raw_info['email']
5252
end
5353

5454
def primary_email

0 commit comments

Comments
 (0)