X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FSearch.php;h=c41df70d9bf5f2db39cf2712a2cdf75fab3bc121;hb=fefe9cd5c918f71c374ffbc43049a5cf7f94c475;hp=5ae1dd7ac4a9c0aecc1fcd6b590c161770722a71;hpb=fc52296a779f9692c7bf8558a6a101389e29ca24;p=friendica.git diff --git a/src/Core/Search.php b/src/Core/Search.php index 5ae1dd7ac4..c41df70d9b 100644 --- a/src/Core/Search.php +++ b/src/Core/Search.php @@ -70,7 +70,7 @@ class Search 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'] ?? '', @@ -136,7 +136,7 @@ class Search 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'] ?? '', @@ -192,7 +192,7 @@ class Search } // 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; } @@ -211,7 +211,7 @@ class Search { 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 []; }