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_sequential_replies,
|
||||||
:notified_about_dominating_topic,
|
:notified_about_dominating_topic,
|
||||||
:suspend_user,
|
:suspend_user,
|
||||||
:unsuspend_user)
|
:unsuspend_user,
|
||||||
|
:facebook_no_email)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Staff actions is a subset of all actions, used to audit actions taken by staff users.
|
# 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))
|
FacebookUserInfo.create({user_id: result.user.id}.merge(facebook_hash))
|
||||||
end
|
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
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue