function DrupalOAuthDataStore::lookup_nonce in OAuth 1.0 6
Same name and namespace in other branches
- 6.3 includes/DrupalOAuthDataStore.inc \DrupalOAuthDataStore::lookup_nonce()
- 7.4 includes/DrupalOAuthDataStore.inc \DrupalOAuthDataStore::lookup_nonce()
- 7.3 includes/DrupalOAuthDataStore.inc \DrupalOAuthDataStore::lookup_nonce()
Overrides OAuthDataStore::lookup_nonce
File
- ./
oauth.module, line 433
Class
- DrupalOAuthDataStore
- Database abstraction class
Code
function lookup_nonce($consumer, $token, $nonce, $timestamp) {
$nonce_1 = db_result(db_query("SELECT nonce FROM {oauth_nonce} WHERE nonce_timestamp='%s'", $timestamp));
if (!$nonce_1) {
db_query("INSERT INTO {oauth_nonce} (nonce, nonce_timestamp) VALUES ('%s', %d)", $nonce, $timestamp);
return null;
}
return $nonce_1;
}