From b39a9a5edc0737d795de31663476f528a07c868b Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Mon, 29 Apr 2013 11:13:31 +0100 Subject: [PATCH] Added missing DB instance::get() calls --- src/OAuth2/Storage/PDO/Session.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/OAuth2/Storage/PDO/Session.php b/src/OAuth2/Storage/PDO/Session.php index a51fe808..6fa098e6 100644 --- a/src/OAuth2/Storage/PDO/Session.php +++ b/src/OAuth2/Storage/PDO/Session.php @@ -52,6 +52,8 @@ class Session implements SessionInterface */ public function associateRedirectUri($sessionId, $redirectUri) { + $db = \ezcDbInstance::get(); + $stmt = $db->prepare('INSERT INTO oauth_session_redirects (session_id, redirect_uri) VALUE (:sessionId, :redirectUri)'); $stmt->bindValue(':sessionId', $sessionId); $stmt->bindValue(':redirectUri', $redirectUri); @@ -77,6 +79,8 @@ class Session implements SessionInterface */ public function associateAccessToken($sessionId, $accessToken, $expireTime) { + $db = \ezcDbInstance::get(); + $stmt = $db->prepare('INSERT INTO oauth_session_access_tokens (session_id, access_token, access_token_expires) VALUE (:sessionId, :accessToken, :accessTokenExpire)'); $stmt->bindValue(':sessionId', $sessionId); $stmt->bindValue(':accessToken', $accessToken); @@ -93,6 +97,8 @@ class Session implements SessionInterface */ public function removeAccessToken($sessionId) { + $db = \ezcDbInstance::get(); + $stmt = $db->prepare('INSERT INTO oauth_session_refresh_tokens (session_access_token_id, refresh_token) VALUE (:accessTokenId, :refreshToken)'); $stmt->bindValue(':accessTokenId', $accessTokenId); $stmt->bindValue(':refreshToken', $params['refresh_token']); @@ -133,6 +139,8 @@ class Session implements SessionInterface */ public function associateAuthCode($sessionId, $authCode, $expireTime, $scopeIds = null) { + $db = \ezcDbInstance::get(); + $stmt = $db->prepare('INSERT INTO oauth_session_authcodes (session_id, auth_code, auth_code_expires, scope_ids) VALUE (:sessionId, :authCode, :authCodeExpires, :scopeIds)'); $stmt->bindValue(':sessionId', $sessionId); $stmt->bindValue(':authCode', $authCode);