public function OAuthStoreSQL::countConsumerAccessTokens in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.7 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::countConsumerAccessTokens()
- 7.2 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::countConsumerAccessTokens()
- 7.4 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::countConsumerAccessTokens()
- 7.5 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::countConsumerAccessTokens()
- 7.6 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::countConsumerAccessTokens()
* Count the consumer access tokens for the given consumer. * *
Parameters
string consumer_key: * @return int
Overrides OAuthStoreAbstract::countConsumerAccessTokens
File
- lib/
oauth-php/ library/ store/ OAuthStoreSQL.php, line 1323
Class
Code
public function countConsumerAccessTokens($consumer_key) {
$count = $this
->query_one('
SELECT COUNT(ost_id)
FROM oauth_server_token
JOIN oauth_server_registry
ON ost_osr_id_ref = osr_id
WHERE ost_token_type = \'access\'
AND osr_consumer_key = \'%s\'
AND ost_token_ttl >= NOW()
', $consumer_key);
return $count;
}