public function OAuthStoreSQL::listConsumers in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.2 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::listConsumers()
- 7.3 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::listConsumers()
- 7.4 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::listConsumers()
- 7.5 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::listConsumers()
- 7.6 lib/oauth-php/library/store/OAuthStoreSQL.php \OAuthStoreSQL::listConsumers()
* Fetch a list of all consumer keys, secrets etc. * Returns the public (user_id is null) and the keys owned by the user * *
Parameters
int user_id: * @return array
Overrides OAuthStoreAbstract::listConsumers
File
- lib/
oauth-php/ library/ store/ OAuthStoreSQL.php, line 1508
Class
Code
public function listConsumers($user_id) {
$rs = $this
->query_all_assoc('
SELECT osr_id as id,
osr_usa_id_ref as user_id,
osr_consumer_key as consumer_key,
osr_consumer_secret as consumer_secret,
osr_enabled as enabled,
osr_status as status,
osr_issue_date as issue_date,
osr_application_uri as application_uri,
osr_application_title as application_title,
osr_application_descr as application_descr,
osr_requester_name as requester_name,
osr_requester_email as requester_email,
osr_callback_uri as callback_uri
FROM oauth_server_registry
WHERE (osr_usa_id_ref = %d OR osr_usa_id_ref IS NULL)
ORDER BY osr_application_title
', $user_id);
return $rs;
}