diff --git a/src/applications/people/conduit/UserQueryConduitAPIMethod.php b/src/applications/people/conduit/UserQueryConduitAPIMethod.php index df0ec65841..0a99ab437e 100644 --- a/src/applications/people/conduit/UserQueryConduitAPIMethod.php +++ b/src/applications/people/conduit/UserQueryConduitAPIMethod.php @@ -80,11 +80,22 @@ final class UserQueryConduitAPIMethod extends UserConduitAPIMethod { $users = $query->execute(); $results = array(); + + $actor = $request->getUser(); + $is_admin = $actor->getIsAdmin(); + foreach ($users as $user) { - $results[] = $this->buildUserInformationDictionary( - $user, - $with_email = false, - $with_availability = true); + if ($is_admin) { + $results[] = $this->buildUserInformationDictionary( + $user, + $with_email = true, + $with_availability = true); + } else { + $results[] = $this->buildUserInformationDictionary( + $user, + $with_email = false, + $with_availability = true); + } } return $results; }