public function OAuthStoreSQL::deleteConsumerAccessToken in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.7 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::deleteConsumerAccessToken()
- 7.3 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::deleteConsumerAccessToken()
- 7.4 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::deleteConsumerAccessToken()
- 7.5 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::deleteConsumerAccessToken()
- 7.6 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::deleteConsumerAccessToken()
* Delete a consumer access token. * *
Parameters
string token: * @param int user_id * @param boolean user_is_admin
Overrides OAuthStoreAbstract::deleteConsumerAccessToken
1 call to OAuthStoreSQL::deleteConsumerAccessToken()
- OAuthStoreSQL::setConsumerAccessTokenTtl in lib/
oauth-php/ library/ store/ OAuthStoreSQL.php - * Set the ttl of a consumer access token. This is done when the * server receives a valid request with a xoauth_token_ttl parameter in it. * *
File
- lib/
oauth-php/ library/ store/ OAuthStoreSQL.php, line 1459
Class
Code
public function deleteConsumerAccessToken($token, $user_id, $user_is_admin = false) {
if ($user_is_admin) {
$this
->query('
DELETE FROM oauth_server_token
WHERE ost_token = \'%s\'
AND ost_token_type = \'access\'
', $token);
}
else {
$this
->query('
DELETE FROM oauth_server_token
WHERE ost_token = \'%s\'
AND ost_token_type = \'access\'
AND ost_usa_id_ref = %d
', $token, $user_id);
}
}