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(); }