Skip to content

Commit

Permalink
Merge pull request #122 from performant-software/as/oauth-email
Browse files Browse the repository at this point in the history
downcase email in oauth check
  • Loading branch information
akstuhl committed Sep 22, 2017
2 parents 2a8f117 + a7f5bc8 commit e53722e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def self.all_tags()
end

def self.find_for_wordpress_oauth2(auth, current)
authed_user = User.where(email: auth.info.email).first_or_initialize do |user|
authed_user = User.where(email: auth.info.email.downcase).first_or_initialize do |user|
user.firstname = auth.info.name.split(' ').first
user.lastname = auth.info.name.split(' ').length > 1 ? auth.info.name.split(' ').last : " "
user.agreement = true
Expand Down

0 comments on commit e53722e

Please sign in to comment.