Topic-icon How to synchronize Registration Password with Email on Registration

Active Subscriptions:

None
Settings:
I use Easy Social for manual registration.
Most registrations are automatic, using JFBConnect via Facebook.

My goal :
- Register/ create new user accounts with Facebook
- Let users login with email and Facebook password ( if they log in manually)

I made a few test according to my understanding of the instructions here: www.sourcecoast.com/jfbconnect/docs/soci...tomatic-registration

My tests combinations:

A- Registration Component - JFBConnect/ and also tested with Joomla in settings for registration component.

B Passoword generation - and set Passwor for Generate Random. I tested with Yes and No

C - Automatically Link Users by Email - Yes


Problems I have:
1) Password creation in any combinations my site does not accept Facebook passwords

2) Email notification after account create about users log in information
it come or without password
or it comes with USERNAME - wich is not used with login.

Could you please help sort out how to set it up?
My goals is to let user Create account with Facebook and able to log in manually with their Facebook Email and Password? (With no need to regenerate password)

Looking forward,
Thank you.
The topic has been locked.
Support Specialist
With Facebook authentication, the user will always have to use the blue "Facebook" login button. They will never be able to enter their Facebook email / password combination on the standard Joomla (or SCLogin) login forms. If that's what you're asking for, it's simply not possible as Facebook doesn't allow us to see or capture the users credentials.

To answer your questions specifically:

1) Password creation in any combinations my site does not accept Facebook passwords

This is expected. JFBConnect has no way of seeing the user's Facebook password. If we did, it would be a huge security risk. The only password we can use directly in the SCLogin form is the user's *Joomla* username/password credentials, which will be different from their Facebook credentials.

2) Email notification after account create about users log in information
it come or without password
or it comes with USERNAME - wich is not used with login.

If you have the EasySocial profile plugin enabled, then we let EasySocial send the new user emails. Do the emails you're receiving look to be from EasySocial? If so, then for some reason the password isn't being included there. You mention "it comes without password or it comes with username". Can you clarify more about what is, or isn't, included in the email you get?

I hope that all helps explain, but if you need anything else, just let me know.

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

None
EasySocial plugin is published.
I set up esycociaal to use E-mail + password for login,

After i switched option Generate Password in you program, it sends emails with username + password..
Probably from your component, I guess:

"
Hello Mike Dopson, ,

Thank you for registering at My Website NAME.

You may now log in to MYDOMAIN.COM/ using your facebook credentials or the following username and password:

Username: mikedop
Password: 35qTsQE7
My question is : is it possible to change it to

login with your email: This email address is being protected from spambots. You need JavaScript enabled to view it.
Pssword: 35qTsQE7

Your Username for your records is: uradop

?
The topic has been locked.
Support Specialist
You'd need to make an edit to one of our files to pass in the user's email address instead of name. To test it out, please edit the /components/com_jfbconnect/models/loginregister.php file. Around line 426, you'll see:
$emailBody = JText::sprintf('COM_JFBCONNECT_EMAIL_REGISTERED_WITH_ADMIN_ACTIVATION_BODY',
                        $data['name'],
                        $data['sitename'],
                            $data['siteurl'] . 'index.php?option=com_users&task=registration.activate&token=' . $data['activation'],
                        $data['siteurl'],
                        $providerName,
                        $data['username'],
                        $this->_newUserPassword
                    );
Change the $data line to $data.

Hopefully that works for you. Please also try authenticating with the SCLogin module with the email credentials. We simply hand the user credentials that are entered to the standard com_users component of Joomla. I don't know if email will work there, unless EasySocial has a plugin to hijack all login attempts to allow email as username.

I hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
That does not work. I made a few tests and could not make it.

I have cleaned browser cache and site cache and tested.

It be nice to get it this way:

Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
Password: asdfg
Username: username

And my guess is that it is also connected with Language File to make correct Titles in front each field

Thank you for taking care and helping ,
Looking forward.
The topic has been locked.
Support Specialist
Sorry for the delayed response. I gave you the wrong line to edit above. That line was for if the user needs to activate their account.

To do what you're looking for, you're correct, you'll need to edit the language string *and* the file mentioned above. The language string you'll want to edit is:
COM_JFBCONNECT_EMAIL_REGISTERED_BODY="Hello %s,\n\nThank you for registering at %s.\n\nYou may now log in to %s using your %s credentials or the following username and password:\n\nUsername: %s\nPassword: %s"
The order of those %s values is important. So, edit that line how you want it to show. Then, please edit the line 470 of the /models/loginregister.php file. It looks like:
$emailBody = JText::sprintf('COM_JFBCONNECT_EMAIL_REGISTERED_BODY', $data['name'], $data['sitename'], $data['siteurl'], $providerName, $data['username'], $this->_newUserPassword);
Update it like:
$emailBody = JText::sprintf('COM_JFBCONNECT_EMAIL_REGISTERED_BODY', $data['name'], $data['sitename'], $data['siteurl'], $providerName, $data['email'], $data['username'], $this->_newUserPassword);
The order in my edit seems like it will fit with the ideal email that you posted above.

I hope that helps, but if you run into issues, let me know.

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

None
Thank you very much, it works well

Thank you for the detailed information and exact code.
The topic has been locked.
Support Specialist
Great, glad that resolved the issue and sorry for the confusion. Just remember to save these changes before you upgrade JFBConnect each time so that you don't lose your custom code.

-Melissa
The topic has been locked.