[Plugin: Simple Facebook Connect] logout bug
-
Hi,
I wanna report a bug and my solving to that about the logout.
I’ve seen that you force the user to logout from his facebook account, ‘couse if you don’t, your wordpress relog the user in, right?I’ve found why (on my site) the user is relogged in:
When you want to logout a user, you have to delete the fbsr_ cookie.
You do this in the sfc_login_logout() function in sfc-login.php, in this line:
setcookie(‘fbsr_’ . $options[‘appid’], ‘ ‘, time() – 31536000, “/”, $domain);
But this code don’t work on the website that have in the home_url() of his wordpress the http://www., couse the facebook cookie is sended to .site.ext, and with your code, you try to delete the .www.site.ext cookie.
I’ve modified the line in this way:
$domain = ‘.’.str_replace(“www.”,””,parse_url(home_url(‘/’), PHP_URL_HOST));And after that don’t need to do the sfc_login_logout_js (don’t wanna do that… the user hate it)
Bye
Mixhttp://wordpress.org/extend/plugins/simple-facebook-connect/
The topic ‘[Plugin: Simple Facebook Connect] logout bug’ is closed to new replies.