OneAll Sign-Ups Using Facebook - No Names or Emails

PatriaCo
PatriaCo
@the-patria-company
6 years ago
349 posts
Is anyone else experiencing new OneAll sign-ups using Facebook that only come in with a 5-digit number?

There are no names or emails.

Is this a setting that I can change or is this a privacy thing the Facebook or the user is selecting?


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

updated by @the-patria-company: 11/11/18 02:52:52AM
brian
@brian
6 years ago
10,148 posts
My guess here is that the name value is actually EMPTY, and since the module requires a user name it generates a random set of digits to use. It checks for 6 different possible values, so if you are getting this it means not only did we not get a username but we also did not get an email address:

                    if (isset($_us['preferredUsername']) && strlen($_us['preferredUsername']) > 0) {
                        $user_name = $_us['preferredUsername'];
                    }
                    elseif (isset($_us['displayName']) && strlen($_us['displayName']) > 0) {
                        $user_name = $_us['displayName'];
                    }
                    elseif (isset($_us['name']['formatted']) && strlen($_us['name']['formatted']) > 0) {
                        $user_name = $_us['name']['formatted'];
                    }
                    elseif (isset($_us['profileUrl']) && strlen($_us['profileUrl']) > 0) {
                        $utmp      = explode('/', $_us['profileUrl']);
                        $user_name = end($utmp);
                    }
                    elseif (isset($_us['accounts'][0]['username']) && strlen($_us['accounts'][0]['username']) > 0) {
                        $user_name = $_us['accounts'][0]['username'];
                    }
                    elseif (strpos($email, '@')) {
                        list($user_name,) = explode('@', $email);
                    }
                    else {
                        // Hopefully we never get here
                        $user_name = mt_rand(11111, 99999);
                    }

See the "hopefully we never get here" part.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags