76692a87 by Jeff Balicki

ee

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