76692a87 by Jeff Balicki

ee

1 parent 6fffdb71
......@@ -151,12 +151,13 @@ $app->get('/activities', function () use ($app, $client, $plus) {
// Revoke current user's token and reset their session.
$app->post('/disconnect', function () use ($app, $client) {
error_log('destroy_start');
//error_log(print_r($app, true));
$token = json_decode($app['session']->get('token'))->access_token;
$client->revokeToken($token);
// Remove the credentials from the user's session.
$app['session']->set('token', '');
unset($app);
unset($client);
unset($_SESSION);
session_destroy();
session_unset();
......