aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/auth/provider/oauth
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-08-02 14:31:12 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-08-02 14:31:35 -0400
commite16dd958e351c39371db943fec359677c950c9ec (patch)
treef575e14693206a1adfcf32234399161da7f839b9 /phpBB/phpbb/auth/provider/oauth
parent2222f3f38048b004b353f0f346cee1d1a0eafd37 (diff)
downloadforums-e16dd958e351c39371db943fec359677c950c9ec.tar
forums-e16dd958e351c39371db943fec359677c950c9ec.tar.gz
forums-e16dd958e351c39371db943fec359677c950c9ec.tar.bz2
forums-e16dd958e351c39371db943fec359677c950c9ec.tar.xz
forums-e16dd958e351c39371db943fec359677c950c9ec.zip
[feature/oauth] OAuth clear tokens on logout
PHPBB3-11673
Diffstat (limited to 'phpBB/phpbb/auth/provider/oauth')
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 3528c0b83f..786caf5463 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -419,4 +419,18 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
// Update token storage to store the user_id
$storage->set_user_id($link_data['user_id']);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function logout($data, $new_session)
+ {
+ // Clear all tokens belonging to the user
+ $sql = 'DELETE FROM ' . $this->auth_provider_oauth_token_storage_table . "
+ WHERE session_id = '" . $this->db->sql_escape($this->user->session_id) . "'
+ AND user_id = " . (int) $this->user->data['user_id'];
+ $this->db->sql_query($sql);
+
+ return;
+ }
}