function drupagram_account_load_all in Drupagram 7
List all accounts.
Return value
array All of the records from the drupagram_accounts table. Note, each record will need to be fully authenticated via drupagram_account_load().
1 call to drupagram_account_load_all()
- drupagram_account_load in ./
drupagram.inc - Load a Instagram account from {drupagram_account}.
File
- ./
drupagram.inc, line 112 - Instagram API functions
Code
function drupagram_account_load_all() {
$accounts =& drupal_static(__FUNCTION__);
// If they were not loaded before, load all of the accounts.
if (is_null($accounts)) {
$accounts = array();
$results = db_query("SELECT * FROM {drupagram_account} ORDER BY username");
if (!empty($results)) {
foreach ($results as $account) {
$accounts[$account->drupagram_id] = $account;
}
}
}
return $accounts;
}