ee
Showing
1 changed file
with
2 additions
and
1 deletions
| ... | @@ -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(); | ... | ... |
-
Please register or sign in to post a comment