Log when facebook doesn't provide an email address

This commit is contained in:
Neil Lalonde
2014-03-19 13:31:17 -04:00
parent 7780013c3a
commit a74764c833
2 changed files with 9 additions and 1 deletions

View File

@@ -24,6 +24,13 @@ class Auth::FacebookAuthenticator < Auth::Authenticator
FacebookUserInfo.create({user_id: result.user.id}.merge(facebook_hash))
end
if email.blank?
UserHistory.create(
action: UserHistory.actions[:facebook_no_email],
details: "name: #{facebook_hash[:name]}, facebook_user_id: #{facebook_hash[:facebook_user_id]}"
)
end
result
end