From e979382ab43e636177be3db10619cbfab082152f Mon Sep 17 00:00:00 2001 From: Greg Kempe Date: Mon, 8 Dec 2014 12:40:44 +0200 Subject: [PATCH] Facebook auth without an email should allow user to enter email In some cases Facebook doesn't send back a user's email. In this case, allow the user to enter their email address. See https://meta.discourse.org/t/facebook-initial-login-create-account-dialog-leaves-email-field-blank/13815/15 --- lib/auth/facebook_authenticator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/auth/facebook_authenticator.rb b/lib/auth/facebook_authenticator.rb index 3b5ddf50361..b4c48ae6746 100644 --- a/lib/auth/facebook_authenticator.rb +++ b/lib/auth/facebook_authenticator.rb @@ -12,7 +12,7 @@ class Auth::FacebookAuthenticator < Auth::Authenticator facebook_hash = session_info[:facebook] result.email = email = session_info[:email] - result.email_valid = true + result.email_valid = !email.blank? result.name = facebook_hash[:name] result.extra_data = facebook_hash