UserSession class [3] - Refactor src/ files excluding Module/Model
This commit is contained in:
+3
-3
@@ -70,7 +70,7 @@ class Search
|
||||
return $emptyResultList;
|
||||
}
|
||||
|
||||
$contactDetails = Contact::getByURLForUser($user_data['url'] ?? '', Session::getLocalUser());
|
||||
$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, Session::getLocalUser());
|
||||
$contactDetails = Contact::getByURLForUser($profile_url, DI::userSession()->getLocalUserId());
|
||||
|
||||
$result = new ContactResult(
|
||||
$profile['name'] ?? '',
|
||||
@@ -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 [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user