function DrupalOAuthDataStore::lookup_token in OAuth 1.0 6
Same name and namespace in other branches
- 6.3 includes/DrupalOAuthDataStore.inc \DrupalOAuthDataStore::lookup_token()
- 7.4 includes/DrupalOAuthDataStore.inc \DrupalOAuthDataStore::lookup_token()
- 7.3 includes/DrupalOAuthDataStore.inc \DrupalOAuthDataStore::lookup_token()
Overrides OAuthDataStore::lookup_token
File
- ./
oauth.module, line 425
Class
- DrupalOAuthDataStore
- Database abstraction class
Code
function lookup_token($consumer, $token_type, $token) {
$result = db_query("SELECT * FROM {oauth_token} WHERE type='%s' AND consumer_key='%s' AND token_key = '%s'", $token_type, $consumer->key, $token);
if ($object = db_fetch_object($result)) {
return new OAuthToken($object->token_key, $object->token_secret);
}
return null;
}