if (!$jUserId)
{
$profile = $provider->profile->fetchProfile($providerUserId, array('email'));if (!$jUserId)
{
$app = JFactory::getApplication();
$app->enqueueMessage("You must create an account first before you can login with a social network");
$app->redirect(JRoute::_('index.php?option=com_seblod&view=register');
$profile = $provider->profile->fetchProfile($providerUserId, array('email'));We could add this, but then the users that have 'connected' their accounts wouldn't be able to login with those social networks... somewhat defeating the point. The change above lets them register with Seblod, but then they can later connect and login with their social accounts.I thought one quick solution is to have in SCLogin module the way to hide "Show Connect Account Button(s)" in the "Login View Settings" tab as we have in the "Logout View Settings" tab. What do you think about ?
Well, you are right, I had not thought of that.We could add this, but then the users that have 'connected' their accounts wouldn't be able to login with those social networks... somewhat defeating the point. The change above lets them register with Seblod, but then they can later connect and login with their social accounts.
- If I'm not yet registeredOn a side note, the above change I provided will not let the user login with social networks and have their account automatically connected. I can help you shift the change I provided to a spot that would redirect completely new users to the registration page while auto connecting ones that already have the same email on your site.
I'm looking for documentation about your new "CustomDB" plugin. Is it anything that can help us on this issue?1/2) Yeah, we don't have a Seblod profile plugin yet. It's something we're planning later this year. Certainly feel free to get in touch with the Seblod developers and let them know you'd like more integration with JFBConnect. It always helps if we have the other developer on board to make such an integration happen.
Well, all "bugs" are a first time. Always there is a first time3) I can see why you'd say this is a bug. It depends on how you look at it. Right now, the email as username field is just that, it takes the user's social network email and uses it as their email. There's no extra logic behind it. We don't plan to change this behavior, but in your specific case where you're letting the user also update their email, I can see how that's confusing. In 3 years since we added the email as username option, this is the first time we've heard of this discrepancy.
To have the automatically link users by email setting work, you'd need to move the code change I presented above lower in the same file. Open the /components/com_jfbconnect/controllers/login.php file and go to line 96. You'll see:- If I'm not yet registered
- and in first of all I click on Social Button
- The popup ask me to login into my Social, if not yet. So JFBConnect detect if there is yet that email registered.
- If Yes connect and login. If no tell me: "You must create an account first before you can login with a social network"
- and redirect me to the Registration page I input.
Maybe, with a field where to input the registration URL page and a language string for message translation, your suggestion can be a real solution (also for all users who have the same problem)
// Check if no mapping, and Automatic Registration is set. If so, auto-create the new user.
if (!$jUserId && !JFBCFactory::config()->getSetting('create_new_users'))$app = JFactory::getApplication();
$app->enqueueMessage("You must create an account first before you can login with a social network");
$app->redirect(JRoute::_('index.php?option=com_seblod&view=register');
// Check if no mapping, and Automatic Registration is set. If so, auto-create the new user.
if (!$jUserId && !JFBCFactory::config()->getSetting('create_new_users'))We don't have any documentation for it, outside of the tooltips when that's enabled. Basically, you can set a specific table in your database that can be written to when a user logs in. There are the same easy drop-downs to select which fields go into each column of the table for the user. So far, the plugin has been well received by the users that need the functionality. If you can't get it, or have any questions, just let me know.I'm looking for documentation about your new "CustomDB" plugin. Is it anything that can help us on this issue?
This is something we may look into. However, our setting doesn't state that it will use the input from the user. There are many JFBConnect sites already using the email as username feature, so changing this behavior could change what is happening on their sites as well. It's something we'd have to be very careful about, and I'm not sure if we'd make this change.Maybe the Username field don't have to be only a pre-population, but also an overwriting from Email to Username when I submit.
Not really. Most of those fields are generated automatically by Joomla or any social profile extension plugins you have enabled. If those 3rd party profile extensions let you re-order the plugins, that ordering will affect the mini-registration form.Is there a way to establish the fields order in the "Normal" JFBConnect mini Registration form ?
That would be fine. The purpose of enabling/hiding those fields is allowing the admin to setup the registration flow how they want, with as few fields as are required. Your users doesn't know/care if it's their email or username their setting up. I would urge caution if your site displays usernames anywhere as you'd be exposing your user's email addresses to everyone.. something that most users don't appreciate.And, what do you think if I take over the "Confirm email" field and use the pre-populated with email "Username" field renaming it (with language override) "Confirm email" ?
What's happen trying to Register with Twitter if I set on Registration to auto populate Username with the Email and hide + autopopulate Email and Show and disable ?!?if you're planning to setup Twitter authentication, there is no way for JFBConnect to get the user's Twitter email address.. so make sure whatever system you come up with would work in that scenario as well.
(Remember I'm not a programmer) If your code suggestion:As for making that into an option with custom redirection and other features, that ability is already 'mostly' available. It would simply need a Seblod Social Profile plugin. With a Social Profile plugin, you can set JFBConnect to automatically redirect new users to that extension. We currently have support for integration with JomSocial and EasySocial's registration flow. Once there, the profile fields are pre-filled with the user's social network profile information already.
I think my suggestion is a solution, not the problem.There are many JFBConnect sites already using the email as username feature, so changing this behavior could change what is happening on their sites as well. It's something we'd have to be very careful about, and I'm not sure if we'd make this change.
I don't understand very well. So, Why when I click to "Register" in SCLogin I'm redirected to the Seblod Registartion page, while if I register with Social Button, always in SCLogin, a "Mini Registration" JFBConnect is shown ?!?Not really. Most of those fields are generated automatically by Joomla or any social profile extension plugins you have enabled. If those 3rd party profile extensions let you re-order the plugins, that ordering will affect the mini-registration form.
I'm agree, but I always use to show "Name"... for me Username "doesn't exist"...I would urge caution if your site displays usernames anywhere as you'd be exposing your user's email addresses to everyone.. something that most users don't appreciate
If JFBConnect can't automatically populate the username field (or email field), we will show that to the user.. even if you have it set to hide. So the "hide" setting isn't guaranteed, it's just what JFBConnect will try if possible.What's happen trying to Register with Twitter if I set on Registration to auto populate Username with the Email and hide + autopopulate Email and Show and disable ?!?
Again, this ability is already possible for extensions that we have Social Profile plugins for. If a user doesn't have an account, they will automatically be redirected to the proper registration flow. Instead of an option like you're asking, the best solution would be to develop a Seblod profile plugin.- Why not add an option in SCLogin to have the JFBConnect work as your hack ? I think would be a very good feature add for all your Users!
See the above. As noted, the option for requiring registration first likely isn't something we'd implement because we already support that ability if you're using the right combination of extensions. Adding a language string for redirection may be something we add though. We'll have to look into this idea more.- Is it possible create and/or use a Language string for the message "You have to be Registered before you can login with a social network" ?
The register button in the SCLogin module is redirecting to the Joomla registration page. I'm assuming that Seblod has a registration redirection page that redirects any requests to the Joomla registration page to Seblods registration page.I don't understand very well. So, Why when I click to "Register" in SCLogin I'm redirected to the Seblod Registartion page, while if I register with Social Button, always in SCLogin, a "Mini Registration" JFBConnect is shown ?!?
Please, Is this anything that happen only with Twitter or Can happen also with Facebook and Google+ ?If JFBConnect can't automatically populate the username field (or email field), we will show that to the user.. even if you have it set to hide. So the "hide" setting isn't guaranteed, it's just what JFBConnect will try if possible.
OKThere's no way to detect if the user has an account on your site *before* they click the Facebook login button though.
Why not have a standard feature ?Registration redirect suggestions
We can't show the 'Register' button in the popup like you're asking. The user would have to *try* to login with their social network credentials before we try to log them in. So, the page will have to redirect to 'our' login flow. In that flow, we can detect if the user that just logged in with a social network actually has an account.. and if not, redirect them to a specific registration path. That's the code we provided above.
The social login is going to the JFBConnect registration page because you have the "Registration Component" setting in JFBConnect set to "JFBConnect". That may be your only option since we currently don't support sending users down the Seblod registration path. That's something we'd have to implement.
See AboveAgain, this ability is already possible for extensions that we have Social Profile plugins for. If a user doesn't have an account, they will automatically be redirected to the proper registration flow. Instead of an option like you're asking, the best solution would be to develop a Seblod profile plugin.
Anyway, also with auto population running (plugins), a "You have to be Registered before you can login with a social network" I think is a good message to put on top of the Registration page where you are redirected. Infact if a User click on Social Button and the Social is not able to give us all informations and the User is not yet Registered, in reality what we are asking to the User is a Registration (maybe he thought to make a "connection" clicking on Social Buttons...)See the above. As noted, the option for requiring registration first likely isn't something we'd implement because we already support that ability if you're using the right combination of extensions. Adding a language string for redirection may be something we add though. We'll have to look into this idea more.
That's right. Anyway Seblod doesn't hack joomla, so by default the Joomla Registration fields are the same of Seblod Registration fields. Infact I can find all Seblod Registered users together with all Joomla Registered users, all, in the standard joomla User Manager. What's change is that in Seblod I can "manage" fields like Hide, autopopulate, establish rules, fields order, and so on... (like in my case modify the "Username" fields...)The register button in the SCLogin module is redirecting to the Joomla registration page. I'm assuming that Seblod has a registration redirection page that redirects any requests to the Joomla registration page to Seblods registration page.
There are very specific circumstances where Facebook and Google/Google+ may not return an email address for a user. It depends on how a user has validated their email address in each of those social networks (for security reasons). It's very *rare* for an email address to not be returned from Facebook or Google, but it does happen. An email is never returned from Twitter.Please, Is this anything that happen only with Twitter or Can happen also with Facebook and Google+ ?
We already have a method for this, using the plugins. I understand we don't support it with Seblod yet. However, we plan to. We really try to avoid adding additional settings to our extensions. There are plenty of options in them already and if every option that a user wanted were added, our configuration pages would be 20x longer than they already are. We are always trying to strike a balance between ease of use and power, and it's one of the things we think we do well.How - create a selection in SCLogin if I want force the Registration before Connecting Social. If "Yes" SCLogin follow your code suggestion. Then instead to put directly the Registration path URL page in the code, write to follow the "Registration Component" field selection (like happen if I click on Register Button). Simple, no?!?
Can be usefull if Users want force the Registration before Social Connection, and in all cases when a plugin is not yet developed...
On the registration page, there are already language strings available to manipulate. The whole "Welcome Bob! Thanks for logging in with Facebook.." string is an option you can set. Please feel free to edit our language files to suit whatever you need. I don't think additional strings are necessary there, but if you feel so, let me know what you feel you can't do with the options already present.Anyway, also with auto population running (plugins), a "You have to be Registered before you can login with a social network" I think is a good message to put on top of the Registration page where you are redirected. In fact if a User click on Social Button and the Social is not able to give us all informations and the User is not yet Registered, in reality what we are asking to the User is a Registration (maybe he thought to make a "connection" clicking on Social Buttons...)
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.
