Topic-icon Disable registration but keep association?

10 years 6 months ago #37357 by chramb1
Here's my situation - life was wonderful with JomSocial and JFBConnect (even with multiprofiles) until last night. I installed XIPT (JoomlaXi's JomSocial ProfileTypes) because I simply have to. It has the ability to do advanced searching and ACL based on profile types that JomSocial won't have for at least 6-8 months (and if their track record is any indication, likely more like a year).

The problem is that JFBConnect and XIPT don't interoperate. Let me be clear, this is nobody's fault. It's just the situation.

Registration with JFBConnect brings up a registration page that is not XIPT's, so profile types are only set in JomSocial, and, at that, only the default is set, no matter what is selected, since XIPT gets into the registration workflow and expects its own profile type. When it doesn't see it, it doesn't look at JomSocial's (that JFBConnect properly set) and it presumes the default.

So this breaks registration.

What I'd like to do, for the time being, is disable JFBConnect's registration flow, but still allow users to log in with Facebook and associate. They simply need to register in the normal manner.

Now, that said, JoomlaXi tells me that their PayPlans extension does integrate, so I'm looking into that. But I'd like to do the above, just for now, until I can get this working properly. This is fine, because we do plan to have paid account types, so setting up PayPlans now and forcing it to use a single, free plan is totally cool with me.

But for now... no JFBConnect registration flow at all. Only log-in with Facebook if you're associated and, if you're not associated, only the option to associate with an existing account. If not, the user should use the standard (in this case, JomSocial) registration flow.

How can I accomplish this?
The topic has been locked.
Support Specialist
10 years 6 months ago #37373 by alzander
Christopher,
JSPT is always something on our radar to implement, but the calls for it have greatly diminished over the last year or so.. not sure why, but it's lessened our urgency to get to that integration. There's always more for us to do :)

As to your question, the main thing I'd need to understand more is what happens when a user clicks the Login with Facebook button but hasn't already associated? Do they just see an error message that says that's not allowed? Do you want to go to the JomSocial registration page? In the case of redirecting to another registration page, JFBConnect wouldn't make the assocation once they've created the account. That's something you'd have to do. We actually do have some ideas on how this could work as we've thought about allowing other registration forms to work in the past.. it *probably* isn't too difficult, but you'd loose the profile import ability since that has to go through our flow.

For the other cases of letting users login that are associated or creating the association for users that login through Joomla, JFBConnect has that covered. Just need to know what you want to do for those that don't fall into either of those categories.

Thanks,
Alex
The topic has been locked.
10 years 6 months ago #37374 by chramb1
So now, if you click the "log in with facebook," and you're not associated, it takes you to JFBConnect's registration page.

Best case, a single configurable option:

What do you want to happen if someone tries to log in with facebook but must register?

[ ] Use JFBConnect
[ ] Use Joomla Registration
[ ] Use JomSocial Registration

If you hit the default JomSocial, JSPT will actually be triggered because it hooks JomSocial's registration event.

This would get the job done, I think.
The topic has been locked.
Support Specialist
10 years 6 months ago #37375 by alzander
But then what... redirecting to a different registration path is easy. For now, in the /components/com_jfbconnect/controllers/login.php file, around line 94, you'll see:
$return = $loginRegisterModel->getLoginRedirect($provider);
            $app->redirect(JRoute::_('index.php?option=com_jfbconnect&view=loginregister&provider=' . $provider->name . '&return=' . base64_encode($return), false));
Update that redirection to the JomSocial registration page. Please note, you will have to have "Registration Mode" set to "Normal" for that to work, but that shouldn't change any other behavior.

The big question is.. after the user registers with JomSocial/JSPT, do you want their account automatically mapped in JFBConnect? If so, again, I think it should be pretty easy.. we save a session variable in that same block of code above and then check for that var in the JFBConnect user plugin.. if set, we make the mapping knowing that the user actually went through Facebook/Google+ login to get there.

Is that what you're looking for? Is that confusing for the actual user?Just trying to get feedback here as the idea of alternative registration pages is definitely a neat one for us, and if you're willing to tinker (as usual, it seems), let us know and we'll help you get something working.

Let me know, but the above redirection should get you started.

Thanks,
Alex
The topic has been locked.
10 years 6 months ago #37376 by chramb1
Works. Here's what I replaced your code with:
$msg = 'No Facebook association was found. Would you like to register?';
$app->redirect(JRoute::_('index.php?option=com_xipt&view=registration', false), $msg);

This makes it very non-confusing for the user ;) Now, of course, there's no Facebook profile being brought down, but that's okay. They can associate later. So in cases where a site admin has XIPT loaded, this removes any bifurcation of the registration flow.

Now... another thing you'll want is an option in SCLogin for XIPT that goes to the route, above. Right now, my XIPT goes to JomSocial, but if you added XIPT as an option, it would go there directly and avoid an extra plugin trap and redirection.

The *real* fun will be in integrating Facebook signup with XIPT. This is because XIPT does all kinds of field manipulation based on profiletype. This might make it tough for you to fill in the fields with Facebook values. I suspect you'll need *them* to consume your data, once set. That's going to be some discussion between you and them, I think.

Again, though, they say they may have done this work in PayPlans. I'll know in a few days when I purchase and integrate that to see what it does.

But for now, this gets me what I needed and should get you simple bypassing for XIPT for anyone who wants it.
The topic has been locked.
Support Specialist
10 years 6 months ago #37384 by alzander
Glad to hear you got something going. Again, if you'd like to remove a step from that process by automatically linking the user to their Facebook account after the account is created with XIPT, just let us know. Should be pretty simple if interested.

Keep us posted on anything else you find or if you need more help.

Thanks,
Alex
The topic has been locked.
10 years 6 months ago #37405 by chramb1
Okay, so let's talk about this now - the way XIPT works is that if you point to its registration instead of JomSocial, or you tell it to "take control" (in which case it hooks into JomSocial's registration trigger and imposes itself first) it asks you to pick a profile type. It then persists this profile type on subsequent queries into JomSocial's registration system and, using JomSocial's triggers, does its own thing when user accounts are created or profile fields are assembled.

Where would you see JFBConnect getting involved in order to be a part of the process?

Right now, you have your own registration system that pre-fills fields based on your mappings. Personally, I love this, but it means that one cannot use JomSocial's registration system and templates, which I don't like.

Ideally, I'd love for you to abandon your own registration flow in the case where JomSocial is installed and, instead, hook their notification that registration fields are being prepared and inject Facebook's values there if the registrant came in using your system. That would not only simplify things by removing the need to have yet another registration shunt, but would allow *any* JomSocial integration to work seamlessly. Then, you could hook onSaveUser (or would it be onCreateUser) to do your mapping and all would be done. Okay, probably not all, I'm sure I'm missing lots, but you get the idea ;)
The topic has been locked.
10 years 6 months ago - 10 years 6 months ago #37406 by chramb1
PS: Right now, what I have is sufficient. What I'm proposing would be better, but thinking it out and doing it right is a good idea. And, that said, I'll be evaluating PayPlans later this week, and JoomlaXi *says* it integrates. I'm going in with no preconceived notions, so we'll see what they've done.

I love JoomlaXi's design work, but their code occasionally has some serious eyebrow-raising decisions. And the biggest frustration is that they're not native English speakers, and, as such, their documentation is not only useless, but often confusingly misleading. No judgment on their abilities - I couldn't write documentation in French if I had to, but it is what it is. If they hired a native English technical writer to grok their code and do their documentation, they would be heroes. ;)

And here's their documentation on how they integrate with you: www.jpayplans.com/payplans/documentation/item/jfbconnect.html ... have fun with that ;)
Last edit: 10 years 6 months ago by chramb1.
The topic has been locked.
Support Specialist
10 years 6 months ago #37718 by alzander
Chris,
Wanted to follow up on this. Sorry I didn't provide any code yet for how to use a different registration flow while still mapping the users. We're actually working on implementing this feature for the v5.2 release. It's working so far, but *no* profile information imports or is pre-filled during the reg process. We're hoping to get that going for the actual v5.2 release, but if it becomes too tricky, that may have to wait a month or so for v5.3. It will still be an option for some users as social login will work and the other features (like Open Graph Actions or subsequent login profile imports) will work with that user just fine.

Either way, let me know how things are going. If you'd like the code to use a different reg flow but still auto link the new user to the social provider they originally logged in with, let me know. It's actually just a few lines of code in the right spots.

Thanks,
Alex
The topic has been locked.
10 years 6 months ago #37719 by chramb1
Nobody has complained about the registration flow as it stands now, and I'm working on our new quiz system (because we make decent money on ad revenue every time we have a quiz - people love their stupid content), so I'm fine waiting for the next release (or the one after).

This becomes more critical to me when we start rolling new verticals (niche sites) much later this year. A good registration flow on a brand new site is critical. For our main sites now, we're good.

Getting the quiz system to post results to Facebook is my focus this and next week as I finish it up. We have over 30K fans on our Rocky Horror Facebook page, and when we promote a quiz, they flock to the site to take it, and getting results posted will just make that explode. That's why I want to make sure it offers them the chance to post even if they're not logged in, as the vast majority of quiz takers aren't site members, but use the features as guests (quizzes, showings directory, etc).
The topic has been locked.