Update PublicApiController, fix visibility for guests

pull/5915/head
Daniel Supernault 8 months ago
parent f972523853
commit 537e179537
No known key found for this signature in database
GPG Key ID: 23740873EE6F76A1

@ -788,15 +788,11 @@ class PublicApiController extends Controller
private function determineVisibility($profile, $user)
{
if (! $user || ! isset($user->profile_id)) {
return [];
}
if (! $profile || ! isset($profile['id'])) {
return [];
}
if ($profile['id'] == $user->profile_id) {
if ($user && $profile['id'] == $user->profile_id) {
return ['public', 'unlisted', 'private'];
}

Loading…
Cancel
Save