Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bigblueboss's avatar

FB login making Email Required

I've got my FB authentication set up, but when the user registers on facebook, he/she has the option to not include his email. How can i make it so that the email information is required and people cannot toggle off the sharing of their email information?

(I say this because I use emails to identify if the user is a new user or not, so having a null value/empty slot in email in my DB wouldn't work).

0 likes
3 replies
opheliadesign's avatar

I use the social provider's user ID field for validation/logging in - $user->id from the object returned from Facebook. So my table has a facebook_id and google_id for the two options my site provides. I check to see if any User matches this ID.

Please or to participate in this conversation.