Topic-icon what are the steps to migrate jomsocial facebook accounts to JFBConnec

Active Subscriptions:

None
I have users who signed at my website through old jomsocial facebook connect and they don't have a password for their accounts as they can only log in through facebook.

when connecting through JFBConnect now they have a registration screen asking them to give their username and password for their account so they will be connected which they can't provide.

how can we solve that as this isn't mentioned in the tutorials as far as I know.

I once saw something called import users but I can't find it in the latest version

thanks
The topic has been locked.
Support Specialist
To migrate Facebook connections from JomSocial over to JFBConnect you should:
* Install and enable the Social Profiles - JomSocial plugin
* Go to the "Usermap" area of JFBConnect
* In the top right, click "Import Connections"

That should fill up the Usermap area with connections between Joomla users and their Facebook accounts that have already been created in JomSocial.

Another thing we'd suggest enabling is the "Automatically Link Facebook Users by Email:" setting. When enabled, if a user clicks the Login with Facebook button for the first time, and a Joomla user exists on the site with the same email address as the user's Facebook account, the user will be immediately logged in and their Facebook account will be 'connected' to their Joomla account without any other steps.

I hope that helps explain, but if you still have issues, just let me know.

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

None
thanks for your reply
all steps done except
step 3: click "Import Connections"

that button is not showing

jomsocial 2.6.3


for your other suggestion
I did that and I tested with a user and it went well.

my comment: shouldn't this process also evolve sending the user same/new regular login details (username+password) to his/her email
my point is that users of old system didn't have the two ways of login provided with JFBConnect. they only had to log in with their facebook while new system give new users the option of either log in with facebook or with account details sent to them by email at time of sign in.

thanks
The topic has been locked.
Support Specialist
Yup, you found a bug. You'll have to make 2 minor code changes to get the Import Connections button to show and to work properly. To make the edits, please open the /administrator/components/com_jfbconnect/controllers/usermap.php file. In there, make the following changes:
Line 32:
Update to:
$profilePlugins = $app->triggerEvent('socialProfilesGetPlugins');
The change there is from jfbcProfilesGetPlugins to socialProfilesGetPlugins

Then, at line 41, you'll see:
$doc->addCustomTag('<script>var jfbcImportMsg = "'. JText::_('COM_JFBCONNECT_MSG_IMPORT_DESC'). '\n'. implode('\n', $pluginNames) . '\n\n"'.JText::_('COM_JFBCONNECT_MSG_IMPORT_CONFIRMATION').';</script>');
Change that to:
$doc->addCustomTag('<script>var jfbcImportMsg = "'. JText::_('COM_JFBCONNECT_MSG_IMPORT_DESC'). '\n'. implode('\n', $pluginNames) . '\n\n'.JText::_('COM_JFBCONNECT_MSG_IMPORT_CONFIRMATION').'";</script>');
In there, we're basically moving a double-quote mark from after \n\n to right before the ;</script> tag.

I hope that's not too confusing. This fix will definitely be in the next release, but it shouldn't be something you need to worry about after you perform the import anyways.

Let me know if you need any help, and thanks for the report,
Alex
The topic has been locked.
Active Subscriptions:

None
thanks
not confusing at all.

now it is fixed and imported.

concerning generating a new password for connected old facebook accounts after import.
I think there could be an improvement here to be considered, if the setting was to auto generate a new login password for new registering Facebook users to have a setting in the import process to send a new generated message informing old imported/returning facebook users of the new password option if it was set that the user can use both login to access the website.
the only draw back is if lets say the numbers of your facebook users are >1000 and your host provider limit outgoings mails to something like 700 messages per hour. so it should also have a system to throttle email sending.

thanks
The topic has been locked.
Support Specialist
Glad to hear the importing issue is fixed. I hate providing code changes, as it's best to just get a new release out, but that takes time to test and get ready.

As to your question about Facebook logins from JomSocial, unfortunately, JFBConnect can't just go through and re-issue everyone a Joomla password for their account. It may be a possibility, but like you said, poses some issues with email everyone those passwords and general logistics of generating them all.

For users created from JomSocial, Joomla will not even show them a 'password' field if they go to edit their profile. However, if you're ok with running a SQL query on your site, you can trick Joomla into showing the "Password" and "Password Confirmation" fields on profile pages for users that don't have one. The query is:
UPDATE <YOUR_PREFIX>_users SET password = "xxx" WHERE password = "";
That sets the *hashed* password value to 'xxx', which would not work out to any real password for a user. What you're essentially doing is setting the password field to garbage, but as long as it's not blank (what the WHERE clause is looking for), then Joomla will think the user already has a password and allow them to update it.

Once that's done, you simply promote the fact that the user can select a password and login. There are probably ways through a template override of the User Profile page that this is also possible, but I don't know how off-hand.

I hope that makes sense, but if not, let me know,
Alex
The topic has been locked.