return $emptyResultList;
}
- $contactDetails = Contact::getByURLForUser($user_data['url'] ?? '', local_user());
+ $contactDetails = Contact::getByURLForUser($user_data['url'] ?? '', DI::userSession()->getLocalUserId());
$result = new ContactResult(
$user_data['name'] ?? '',
* @return ResultList
* @throws HTTPException\InternalServerErrorException
*/
- public static function getContactsFromGlobalDirectory(string $search, int$type = self::TYPE_ALL, int $page = 1): ResultList
+ public static function getContactsFromGlobalDirectory(string $search, int $type = self::TYPE_ALL, int $page = 1): ResultList
{
$server = self::getGlobalDirectory();
foreach ($profiles as $profile) {
$profile_url = $profile['profile_url'] ?? '';
- $contactDetails = Contact::getByURLForUser($profile_url, local_user());
+ $contactDetails = Contact::getByURLForUser($profile_url, DI::userSession()->getLocalUserId());
$result = new ContactResult(
$profile['name'] ?? '',
}
// Add found profiles from the global directory to the local directory
- Worker::add(PRIORITY_LOW, 'SearchDirectory', $search);
+ Worker::add(Worker::PRIORITY_LOW, 'SearchDirectory', $search);
return $resultList;
}
{
Logger::info('Searching', ['search' => $search, 'mode' => $mode, 'page' => $page]);
- if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
+ if (DI::config()->get('system', 'block_public') && !DI::userSession()->isAuthenticated()) {
return [];
}