diff --git a/app/models/user_history.rb b/app/models/user_history.rb index 1188e62db..6747a2842 100644 --- a/app/models/user_history.rb +++ b/app/models/user_history.rb @@ -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. diff --git a/lib/auth/facebook_authenticator.rb b/lib/auth/facebook_authenticator.rb index e5e203971..05b6c7b4b 100644 --- a/lib/auth/facebook_authenticator.rb +++ b/lib/auth/facebook_authenticator.rb @@ -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