public static function DrupalOAuthToken::deleteToken in OAuth 1.0 6.3
Same name and namespace in other branches
- 7.4 includes/DrupalOAuthToken.inc \DrupalOAuthToken::deleteToken()
- 7.3 includes/DrupalOAuthToken.inc \DrupalOAuthToken::deleteToken()
Deletes the token with the key from the database
Parameters
string $key: The key of the token to delete.
object $consumer: The consumer for which to fetch a token
Return value
void
1 call to DrupalOAuthToken::deleteToken()
- DrupalOAuthToken::delete in includes/
DrupalOAuthToken.inc - Deletes the token from the database
File
- includes/
DrupalOAuthToken.inc, line 124
Class
Code
public static function deleteToken($key, $consumer) {
//TODO: Ensure backwards compatibility
db_query("DELETE t, pt FROM {oauth_common_token} t LEFT JOIN {oauth_common_provider_token} pt ON t.tid = pt.tid\n WHERE t.key_hash = '%s' AND t.csid = %d", array(
':key_hash' => sha1($key),
':consumer' => $consumer->csid,
));
}