You are here

function SimpleOAuthDataStore::lookup_token in OAuth 1.0 6

Overrides OAuthDataStore::lookup_token

File

./OAuth.php, line 687

Class

SimpleOAuthDataStore

Code

function lookup_token($consumer, $token_type, $token) {

  /*{{{*/
  $rv = dba_fetch("{$token_type}_{$token}", $this->dbh);
  if ($rv === FALSE) {
    return NULL;
  }
  $obj = unserialize($rv);
  if (!$obj instanceof OAuthToken) {
    return NULL;
  }
  return $obj;
}