Replace last instance of Contact::select
This commit is contained in:
parent
9d45118356
commit
b684fffcb7
|
@ -6223,14 +6223,11 @@ function api_friendica_profile_show($type)
|
||||||
|
|
||||||
// select all users from contact table, loop and prepare standard return for user data
|
// select all users from contact table, loop and prepare standard return for user data
|
||||||
$users = [];
|
$users = [];
|
||||||
$nurls = Contact::select(['id', 'nurl'], ['uid' => api_user(), 'profile-id' => $rr['id']]);
|
$nurls = Contact::selectToArray(['id', 'nurl'], ['uid' => api_user(), 'profile-id' => $rr['id']]);
|
||||||
|
|
||||||
if (DBA::isResult($nurls)) {
|
|
||||||
foreach ($nurls as $nurl) {
|
foreach ($nurls as $nurl) {
|
||||||
$user = api_get_user($a, $nurl['nurl']);
|
$user = api_get_user($a, $nurl['nurl']);
|
||||||
($type == "xml") ? $users[$k++ . ":user"] = $user : $users[] = $user;
|
($type == "xml") ? $users[$k++ . ":user"] = $user : $users[] = $user;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$profile['users'] = $users;
|
$profile['users'] = $users;
|
||||||
|
|
||||||
// add prepared profile data to array for final return
|
// add prepared profile data to array for final return
|
||||||
|
|
Loading…
Reference in a new issue