Using 6.x-2.x-dev on Drupal 6.10, LoginToboggan and Global Redirect disabled. If I go to /logout?destionation=node/1234, I get bounced back to /node/1234 without being logged out. If there's no destination argument, it works fine. It also fails if you go to /logout?destionation= (ie, equals blank).

CommentFileSizeAuthor
#6 fb_logout.diff1.38 KBDave Cohen
#1 591410.patch1.24 KBDave Cohen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Cohen’s picture

Status: Active » Needs review
FileSize
1.24 KB

Interesting one, thanks for reporting.

I consider the attached patch a hack. But with facebook hacks are a way of life.

gstout’s picture

Title: FBC logout fails if a "destination" query argument is set » FBC & Drupal logout fails
Version: 6.x-3.x-dev » 6.x-3.0-beta1

So... I can't log out period. In some ways I find this funny as it might be great for user retention.

Going to /logout doesn't log me out of facebook or Drupal. This happened in the last dev and in the beta I put on today. Hope that helps

Happy to test ideas

Dave Cohen’s picture

Status: Needs review » Needs work

Clicking a logout link should work, although typing the /logout url into the browser doesn't, because it wont log you out of facebook. So you'll be logged in again, thanks to their single sign on.

The patch above is way out of date. The code above might work though. It should be placed in fb_user_user() for $op=='logout'.

gstout’s picture

We don't have a log-out link because we have done away with our user account system in favor of a third party membership system.
Now only editors log-in by typing /user and logout with /logout.

Hmm. If one needed to logout, could then first got to facebook.com and logout and then come back to the site and type /logout? Is there a FB logout button (I've never seen one) that i could implement with fbml?

I guess this is not a big deal but I'm sure some one will complain to me at some point.

Dave thanks for your great work and for you on time beta delivery. It was like Christmas!

Dave Cohen’s picture

If the user logs in using facebook connect, then goes to facebook (in say another tab) and logs out there, there is no need to return to your site and logout. They are already logged out.

You could use drupal's hook_menu_alter to change the permissions for /logout, so that only your admins/editors can use it. Then you can simply show it on the page, and clicking it would log users out properly.

Dave Cohen’s picture

Title: FBC & Drupal logout fails » drupal logout does not work when connected to facebook
Version: 6.x-3.0-beta1 » 6.x-3.x-dev
Status: Needs work » Needs review
FileSize
1.38 KB

Here's a re-roll of the patch.

Dave Cohen’s picture

Status: Needs review » Fixed

no reviews, but checked this in anyway.

almaudoh’s picture

I had this same issue and I applied your diff. It's working fine now. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.