function oauth_common_user_access_tokens in OAuth 1.0 6.3
Same name and namespace in other branches
- 7.4 oauth_common.inc \oauth_common_user_access_tokens()
- 7.3 oauth_common.inc \oauth_common_user_access_tokens()
Return information about access tokens related to a user.
Parameters
int $uid: User ID to retrieve consumer info for.
Return value
array An array of consumer info
File
- ./
oauth_common.inc, line 33
Code
function oauth_common_user_access_tokens($uid) {
$result = db_query("SELECT * FROM {oauth_common_token} WHERE uid = %d AND type = '%d'", array(
':uid' => $uid,
':type' => OAUTH_COMMON_TOKEN_TYPE_ACCESS,
));
$tokens = array();
while ($token = DrupalOAuthToken::fromResult($result)) {
$tokens[] = $token;
}
return $tokens;
}