Go Back   Web Scribble Forums » Joomla » jConnector
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-03-2010, 06:18 PM
Junior Member
 
Join Date: Jan 2010
Posts: 4
Default Logout of both FB and Joomla

I've put the jconnector mod on a login/logout page and tweaked the code some so that the button shows all the time so Joomla users can use the connect button to login to Joomla. This was mostly because after creating an account in Joomla using the connect button, they were confused as to what their username was to login with--in FB it is the email address.

It's not that big of deal, they can just click on the Joomla logut link too, but I was wanting to log users out of FB and Joomla at the same time. I added autologoutlink="true" to the button code which brings up the FB logout button if they are logged into FB. Clicking this, however, only logs then out of FB and not Joomla. I tried a few things, but wasn't able to get it to logout of Joomla too. I was wondering if you knew the FB code enough to know how to get the code to log users out of both Joomla and FB.

Thanks so much for the cool mod!
Reply With Quote
  #2 (permalink)  
Old 01-07-2010, 09:36 AM
Junior Member
 
Join Date: Jan 2010
Posts: 7
Default

Joomla! • View topic - logout via javascript - sorry but cant find this talked abou

I helped you ? Please help me if you like travel please support travel reviews and post something or share on facebook etc or recommend for friends
Reply With Quote
  #3 (permalink)  
Old 01-08-2010, 12:12 PM
Junior Member
 
Join Date: Jan 2010
Posts: 4
Default

That helped some. It did get me thinking about the function, though, and after some more searching I figured out I need to add it to the js at the bottom of default.php page like this:

FB.ensureInit ( function () { FB.Connect.logoutAndRedirect("<?php echo $uri_base; ?>modules/mod_jconnector/jconnector_server_logout.php"); } );

This will redirect the FB logout button to this new page I created that basically just has this:
$mainframe->logout();

So, after clicking the FB logout button, the user is logged out of FB, then redirected to that page which then logs them out of Joomla and puts them back on the main Joomla page.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 11:11 AM.