From c8983b35a0b0bb082b76fe3c4ce7d555bf7c0760 Mon Sep 17 00:00:00 2001 From: Malachi Soord Date: Fri, 5 Dec 2014 18:12:19 +0100 Subject: [PATCH] Fixed example API hasScope reference --- examples/relational/api.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/relational/api.php b/examples/relational/api.php index fededdf8..f4d02202 100644 --- a/examples/relational/api.php +++ b/examples/relational/api.php @@ -59,11 +59,11 @@ $router->get('/users', function (Request $request) use ($server) { 'name' => $result['name'], ]; - if ($server->hasScope('email')) { + if ($server->getAccessToken()->hasScope('email')) { $user['email'] = $result['email']; } - if ($server->hasScope('photo')) { + if ($server->getAccessToken()->hasScope('photo')) { $user['photo'] = $result['photo']; } @@ -87,11 +87,11 @@ $router->get('/users/{username}', function (Request $request, $args) use ($serve 'name' => $result[0]['name'], ]; - if ($server->hasScope('email')) { + if ($server->getAccessToken()->hasScope('email')) { $user['email'] = $result[0]['email']; } - if ($server->hasScope('photo')) { + if ($server->getAccessToken()->hasScope('photo')) { $user['photo'] = $result[0]['photo']; }