Log when facebook doesn't provide an email address
This commit is contained in:
parent
7780013c3a
commit
a74764c833
|
@ -22,7 +22,8 @@ class UserHistory < ActiveRecord::Base
|
|||
:notified_about_sequential_replies,
|
||||
:notified_about_dominating_topic,
|
||||
:suspend_user,
|
||||
:unsuspend_user)
|
||||
:unsuspend_user,
|
||||
:facebook_no_email)
|
||||
end
|
||||
|
||||
# Staff actions is a subset of all actions, used to audit actions taken by staff users.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue