Topic-icon User logged in? -> if yes, auto redirect , if no-> login then redir

Active Subscriptions:

None
Here's my scenario: There is a members area which requires login to access. There are specific links (ex: create event, create group, etc) that require a user to be logged in before accessing. I'll refer to these as "registered" areas.

How do I make this work?
1. User clicks link to "registered area".
2. Joomla/ JFB checks to see if the user is logged in or not
3a-If the user IS logged in, they are automatically redirected to the registered area they were originally trying to access
3b-If the user is NOT logged in, they are prompted to login using SCLogin, and then redirected to the restricted area they were originally trying to access.

Help, please :) I'm in too deep and the possible solutions have stopped occurring to me.
The topic has been locked.
Support Specialist
jprintz,
3a) This should be taken care of by Joomla itself. When you mark a menu items as 'Registered', Joomla will automatically redirect the user to the Log In page if they aren't already logged in.

3b) Joomla will redirect the user (normally) to the Joomla login page. On this page, we'd simply recommend you modify the template and add the Login With Facebook button. That page can be found in /components/com_user/tmpl/login/default_login.php. You should copy that file to:
/templates/<YOUR_TEMPLATE>/html/com_user/login/default_login.php
If those directories don't exist, create them. If the file is already there, just edit it without copying it first.

Once editing, simply add {JFBCLogin} wherever you want the Login With Facebook button to appear in the login view. JFBConnect should take care of redirecting the user back to the original page automatically.

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

None
Hi,

Thanks so much for replying so quickly.

3a - actually, it's been my experience that making a menu item "registered" means that it can only be viewed when a person is logged in. Am I missing something major here?

3b - are you telling me I can incorporate the JFBCLogin plugin into Joomla's own login? So I can point a menu item to a menu type of "login" and it will infact show the FB option? And then comply with whatever redirect parameter is in the menu setting? If so, my day has been made!!!! Going to try now, hoping that you'll confirm.

THANK YOU!! (I HOPE!)
The topic has been locked.
Active Subscriptions:

None
I made the edits to the joomla login as you directed. It appears to work successfully but then ends up with a 310 error (too many redirects). It does appear to be successfully logging me in, but not redirecting once doing so.
Also, when i try to use the standard joomla login on the same page, I am taken to a plain white page that says invalid token. Once i remove the {JFBCLogin} plugin from the .php file, the standard login will work again.
I have consulted the solutions provided in the post titled: Re: SCLogin gets Internal Error does not log into site logs into Facebook but havent had any success there.

example URL is readysettest.yousaygo.com/addorganization

I really want this to work , thanks in advance for all of your help!
The topic has been locked.
Support Specialist
The button is missing from that page, so I can't see what you see.. as for other notes:
3a) Sorry, yes, I mis-spoke a little. If a user ever goes to a page that is marked as registered (either the menu item is or parts of the component force the user to be logged in), Joomla will redirect the user to the login page. After they successfully login, Joomla (or JFBConnect) will redirect them to where they were before. You're correct that the menu item will be hidden from users that aren't logged in when marked as registered. However, if you then link to that direct menu item location in a button or even another menu item (creating an alias or External URL link), Joomla will kick in and force the login.

3b) Not sure why you're getting the redirect problems. Do you see that issue on your home page when using the SCLogin module? I also have no idea why the invalid token error would present itself. If you're using caching on the site, try disabling it, as that may be interfering.

Finally, another thing I noticed is that it seems like you may have other Facebook extensions or integration going on on your site that could be interfering. The page below has a Login With Facebook button that isn't from JFBConnect:
readysettest.yousaygo.com/index.php?opti...yuc&controller=event
Please try to disable other integrations. If they are loading the same libraries as us or trying to do the same things, bad conflicts can occur.

Hope that explains a bit more,
Alex
The topic has been locked.
Active Subscriptions:

None
Hi Alex,

Thanks for your help. We have replaced all login prompts now with the SCLogin module and I believe have removed any other reference to other FB integration sitewide. You can verify this by clicking the "submit event" button or other red buttons or click my account here readysettest.yousaygo.com/what

1. The invalid token error is now gone.
2. Caching is not turned on, and just for gits and shiggles I cleared everything/checked everything in and the redirect problem still happens.
3. I also tried using a standard/default template such as beez and atomic, issue still persists.
4. I get the redirect loop when using the module in the left position as well.
5. The FB login *is* successful, because if i navigate to a registered area, this is what I see and I can browse through those registered areas. readysettest.yousaygo.com/images/sclogin_error_fbsuccessful.JPG

Is there any additional information I could provide to help sort this out?

Thank you!
The topic has been locked.
Active Subscriptions:

None
Also I just PM'd you login info as super admin.
The topic has been locked.
Active Subscriptions:

None
It's resolved!

Sorry to post so many times, but I was determined to figure it out. Please forgive me if this is in your documentation and I overlooked it.

The redirect loop/too many redirects error was (almost painfully obviously) caused becuase:
-We had individual redirects from the SClogin module for different menu items AND
- I had both the "Enable New User Redirection" and "Enable Returning User Redirection:" set to YES in the component -->configuration -->login/logout tab. Turning these off has apparently completely resolved the issue.
The topic has been locked.
Support Specialist
jprintz,
Fantastic! Glad you were persistent. We can help how we can, but as you know, there's a lot of different ways to configure things.

Honestly, not sure why they need to be off, actually, but with some SEF extensions, weird things can happen some times. If you really need those enabled, let us know and we can try to help figure out what's wrong.

Thanks, and good luck,
Alex
The topic has been locked.