Skip to content

Commit

Permalink
Work with mailchimp if contact not set
Browse files Browse the repository at this point in the history
  • Loading branch information
colinyoung committed Apr 10, 2014
1 parent 97fe8a0 commit c73c07f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/omniauth/strategies/mailchimp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ def request_phase
}

info do
contact = raw_info["contact"] || {}

{
:first_name => raw_info["contact"]["fname"],
:last_name => raw_info["contact"]["lname"],
:email => raw_info["contact"]["email"]
:first_name => contact["fname"],
:last_name => contact["lname"],
:email => contact["email"]
}
end

Expand Down

0 comments on commit c73c07f

Please sign in to comment.