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