Topic-icon Redirection after login

Active Subscriptions:

None
9 years 6 months ago #47472 by andres_Santiago
Hi,

We are using memberships in our platform, so the only option we found to redirect users to the right content after login is using JS Custom Redirect. This extension use "onUserLogin" and "onUserLogout", every time the Joomla Framework fires these events this extension begins to work and performs the redirect we have set in its configuration. To avoid errors please could you let me know If JFBConnect uses the same event in Joomla? because if Joomla tries to execute two actions it will cause a problem, however if it uses other triggers it will work.

Thank you!
The topic has been locked.
Support Specialist
9 years 6 months ago #47473 by alzander
Replied by alzander on topic Redirection after login
That would likely cause some problems for the registration flow of JFBConnect. There is more work that JFBConnect does after the onUserLogin trigger to successfully map the new user to the social account that they registered with. It's never recommended for the onUserLogin triggers to redirect the user, because that stops all further execution of the login or registration process from whoever is calling it (in this case, JFBConnect).

JFBConnect has options for New User Redirection and Returning User Redirection that should be used if you need to push the user to a special page after they register for the first time or are logging back into the site.

I hope that helps answer your question, but if you need anything else, just let us know.

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

None
9 years 6 months ago #47478 by andres_Santiago
Then is some option to use JS Custom Redirect extension with JFBConnect? The registration is not a problem because we are using jomsocial on it. However we have 7 payplans memberships, and we need to redirect users to different contents according their memberships after login. It will be very helpful to use JS Custom Redirect to do it, because is the only extension we found with this functionality.
The topic has been locked.
Support Specialist
9 years 6 months ago #47480 by alzander
Replied by alzander on topic Redirection after login
I don't know anything about JS Custom Redirect, so I can't really speak to what it does or how we could work together. If it tries to intercept the login process and redirect the user, it will cause problems. If it doesn't trigger during registration, it *may* be ok, but there are things that JFBConnect does after it authenticates a user during the login process which could be problematic if skipped.

I'd contact the JS Custom Redirect developers and see if they have a way to store a bit of data that a user just logged in and then use a system plugin that would trigger on the next page load to actually perform the redirect. That's the recommended way to do things as it doesn't prevent the current login flow from stopping abruptly.

Beyond the above, have you actually tested the above scenario to see if there are problems? Again, I'm going on what you've said of how things work. If things seem to be working properly for authentication and login, then there may not be an issue. Without know the exact details of how the redirection is performed, I'm just guessing.

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

None
9 years 6 months ago - 9 years 6 months ago #47495 by andres_Santiago
I am testing the plugin but is not working properly. Please find attached a copy of the plugin, just in case you wanna check how it works. If you have some news please let me know.

Au usual thanks for your awesome support!

pkg-js-customredirect-110-j3.zip
Last edit: 9 years 6 months ago by andres_Santiago.
The topic has been locked.
Support Specialist
9 years 6 months ago #47498 by alzander
Replied by alzander on topic Redirection after login
Can you tell us a lot more about *how* it's not working properly? Is there an error message, incorrect redirect, profile data not imported, etc?

Also, do things work when you disable that plugin?

We'll try to take a look at things over the next few days, but I'm not sure we'll have a solid answer as we've never used the plugin before and don't know your full configuration. Even if we do find the issue, if it is due to a redirect in the onAfterLogin event, there won't be much we can do about it. In that case, again, you'd need to contact the developer to determine if there's a different way to implement the feature.

Alex
The topic has been locked.