Topic-icon How set to JFB import just complete name

Active Subscriptions:

None
8 years 11 months ago #53031 by totallnet
Hi...

Im using Easysocial as my registration form.
I use one single field as name + surname(last name)
But when i use for example Facebook to import user data... he brings me complete name + surname (last name)
How can i set to just import complete name.
See here the issue : docs.google.com/file/d/0B2sFTCHrjILSaExu...nM/edit?usp=drivesdk
The topic has been locked.
Support Specialist
8 years 11 months ago #53038 by mel
There are several different Facebook name fields available for import (Full Name, First Name, Middle Name, and Last Name). Depending on how you've set up the profile mapping for Facebook->EasySocial, I can see the name being imported strangely. More specifically, if you have Full Name imported into the First Name ES field and Last Name imported into the Last Name ES field, then you'd get the behavior that you're seeing (as expected). In JFBConnect > Profiles > EasySocial tab, can you verify that you've set the first name field values to import 'First Name' and not 'Full Name'?

-Melissa
The topic has been locked.
Active Subscriptions:

None
8 years 11 months ago #53042 by totallnet
Hi.. thanks for reply...

I dont have name field in that tab.. see here docs.google.com/file/d/0B2sFTCHrjILSMnBk...zQ/edit?usp=drivesdk
The topic has been locked.
Support Specialist
8 years 11 months ago #53049 by alzander
I just went through the standard registration process on your site and I can see the issue. From this page:
/index.php?option=com_easysocial&view=registration&layout=steps&step=1&Itemid=780
The first field is "* Nome:". That seems to indicate you want the user's full name. However, the actual field HTML looks like:
<input type="text" size="30" class="form-control input-sm" id="first_name" name="first_name" value="" data-field-jname-name="" placeholder="Seu Nome">
EasySocial thinks the user is providing only their first name here, not their full name. To my knowledge, EasySocial doesn't have a generic "name" type of field, only a first, middle and last name field. I'm not sure how you've set that up so that the middle and last name are missing, but it's not standard.

JFBConnect will automatically set the users first, middle and last name. Depending on how you display the user's first name or first/last name combo, I can see how something may look to be duplicated.

In the admin area, if you go to Users, is the proper name shown for the user? If so, that would indicate we're doing things correctly, but the display on the front-end is just wrong.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
8 years 11 months ago #53054 by totallnet
Please check this screencast.com/t/N8POAAO7

EasySocial have in profiles type .. option to use just single name..
The topic has been locked.
Support Specialist
8 years 11 months ago #53057 by alzander
We'll have to investigate that setting further. If you're up for testing some code right now, I'd suggest editing the /plugins/socialprofiles/easysocial/easysocial.php file. Around line 353, you'll see:
$name->set('first', $profileData->get('first_name', ""));
$name->set('last', $profileData->get('last_name', ""));
$name->set('middle', $profileData->get('middle_name', ""));
Update that to:
$fullName = $profileData->get('first_name', "") . ' ' . $profileData->get('last_name', "");
$name->set('first', $fullName);
That should set the first_name value to the user's first / last name (without a middle) for any new users that register.

Test that out and let us know how it goes.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
8 years 11 months ago - 8 years 11 months ago #53058 by totallnet
No success.... you can try in www.travelteca.com ... go ahead...
Last edit: 8 years 11 months ago by totallnet.
The topic has been locked.
Support Specialist
8 years 11 months ago #53067 by alzander
I can't. When I try to use Facebook, I get:
"App Not Setup: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions."
Please make sure you've fully followed our guide to let all users authenticate.

If you're not using the automatic registration option in JFBConnect, then you'll need to make the exact same change at line 275 in the same file. Test that and see how it goes. Again, this will only work with new user registrations. It won't update users that already have the switched up name.

Thanks,
Alex
The topic has been locked.