×

Error

Please login first
× Joomla Facebook Connect support forum

Topic-icon Version 4.2.3 JFBConnect Email as username on autoregistration

Active Subscriptions:

None
Hi There,

I recently purchased JFBConnect and needless to say. It's one of the most well thought out applications.

What i need, is already where i need it, when i need it, in JFB.

Quite impressive.

One small issue. May be it's just me.

In our site there is no username. We just have e-mail doubling the purpose. I want JFB autoregistration to automatically fill facebook e-mail id in my joomla table as username and also as e-mail. (Am I asking too much ?).

Can you help me.

To give you little background, I have searched your forums.

1) Plenty of info in this regard for JLinked (Damn the other tool , should have gone for a combo package when offered :-)).

2) The other info (about view.html.php), I just can't find it in my code (No. not the page. I got that. But the lines you are referring to...pch).


Would appreciate it if you can.......you know....walk me through...! I can buy you beer if you want.

Thanks,

niranjan
The topic has been locked.
Support Specialist
First off, very glad to hear you're enjoying JFBConnect. It's taken a lot of work, and feedback from users, to make it what it is!

As for email as username, we're planning to add this as an option, hopefully in the next release. Anyways, just to make sure, you're using the Automatic Registration flow? If so, here's the quick code change that should work for you, if you're up for a minor mod.

In the /components/com_jfbconnect/models/loginregister.php file, around line 68, you'll see the getAutoUsername(...) function. Simply add this line after the {:
return $fbUser['email'];
So, it should look like:
function getAutoUsername($fbUser, $fbUserId, $usernamePrefixFormat)
    {
        return $fbUser['email'];
        if ($usernamePrefixFormat == '0') //fb_
        {
That will simply skip your selected auto-username setting in JFBConnect. This is completely untested, so please make sure it works, but a pretty simple change :)

Let me know how it goes, and good luck!
Alex
The topic has been locked.
Active Subscriptions:

None
Amazing.

That worked like charm. Precisely does what I need.

Kudos.

PM me if you have any special offer for JLinked (Assuming I have already bought JFB). :-)

Niranjan
The topic has been locked.
Support Specialist
Glad to hear that worked! For either JFBConnect or JLinked, you get an automatic 20% off if you are already an active subscriber. That works for renewals as well. The discount is applied automatically when you go to checkout.

Hope that works for you! Right now, just so you know ahead of time, JLinked does *not* support automatic account creation. Until about a week ago, LinkedIn did not allow us to get the user's email address. They did just add that ability, so automatic registration is coming, but for now, there's still a form for the users.

Best of luck,
Alex
The topic has been locked.