From 3d115053d2b3e4c8a6df95eb01a5989789575be6 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Mon, 4 Nov 2013 16:08:44 +0800 Subject: [PATCH] MDL-42666 repository_boxnet: Revoke access token when logging out --- lib/boxlib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/boxlib.php b/lib/boxlib.php index ed8f175addb..d11475b7968 100644 --- a/lib/boxlib.php +++ b/lib/boxlib.php @@ -91,13 +91,13 @@ class boxnet_client extends oauth2_client { * @return void */ public function log_out() { - if ($this->accesstoken) { + if ($accesstoken = $this->get_accesstoken()) { $params = array( - 'client_id' => $this->clientid, - 'client_secret' => $this->clientsecret, - 'token' => $this->accesstoken->token + 'client_id' => $this->get_clientid(), + 'client_secret' => $this->get_clientsecret(), + 'token' => $accesstoken->token ); - $this->post($this->get_revoke_url(), $params); + $this->post($this->revoke_url(), $params); } parent::log_out(); }