From b9570ac6b07e29b5f04054ec5f110d2d71c78b9f Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Tue, 30 Apr 2013 15:48:11 +0100 Subject: [PATCH] Fixed getScopes --- src/OAuth2/Storage/PDO/Session.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OAuth2/Storage/PDO/Session.php b/src/OAuth2/Storage/PDO/Session.php index bff184a1..a49302a9 100644 --- a/src/OAuth2/Storage/PDO/Session.php +++ b/src/OAuth2/Storage/PDO/Session.php @@ -273,8 +273,8 @@ class Session implements SessionInterface $stmt = $db->prepare('SELECT oauth_scopes.* FROM oauth_session_token_scopes JOIN oauth_session_access_tokens ON oauth_session_access_tokens.`id` = `oauth_session_token_scopes`.`session_access_token_id` JOIN oauth_scopes ON oauth_scopes.id = `oauth_session_token_scopes`.`scope_id` WHERE access_token = :accessToken'); $stmt->bindValue(':accessToken', $accessToken); + $stmt->execute(); - $result = $stmt->fetchObject(); - return ($result === false) ? array() : (array) $result; + return $stmt->fetchAll(); } } \ No newline at end of file