summaryrefslogtreecommitdiff
path: root/plugins/FBConnect/FBConnectPlugin.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-06-30 01:54:08 +0000
committerZach Copley <zach@controlyourself.ca>2009-06-30 01:54:08 +0000
commite00f433314722520871b0d42645909929223a662 (patch)
treec200a9342e23696792a06ac6fa4d231d7190635e /plugins/FBConnect/FBConnectPlugin.php
parentdfb4ed5265f58b93fbbbd1bb5e05986ec65a20ba (diff)
Only use FB's Javascript logout, not its PHP method too
Diffstat (limited to 'plugins/FBConnect/FBConnectPlugin.php')
-rw-r--r--plugins/FBConnect/FBConnectPlugin.php18
1 files changed, 4 insertions, 14 deletions
diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php
index 3a4f0dbe3..459a80282 100644
--- a/plugins/FBConnect/FBConnectPlugin.php
+++ b/plugins/FBConnect/FBConnectPlugin.php
@@ -287,23 +287,13 @@ class FBConnectPlugin extends Plugin
function onStartLogout($action)
{
- $user = common_current_user();
-
- $flink = Foreign_link::getByUserId($user->id, FACEBOOK_CONNECT_SERVICE);
-
$action->logout();
+ $fbuid = $this->loggedIn();
- if ($flink) {
-
- $facebook = getFacebook();
-
+ if (!empty($fbuid)) {
try {
- $fbuid = $facebook->get_loggedin_user();
-
- if ($fbuid > 0) {
- $facebook->logout(common_local_url('public'));
- }
-
+ $facebook = getFacebook();
+ $facebook->expire_session();
} catch (Exception $e) {
common_log(LOG_WARNING, 'Could\'t logout of Facebook: ' .
$e->getMessage());