]> git.mxchange.org Git - friendica.git/commitdiff
Enable profile contacts page for profile owner
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 9 Aug 2020 13:09:38 +0000 (09:09 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 9 Aug 2020 13:09:38 +0000 (09:09 -0400)
src/Module/Profile/Contacts.php

index 6981b43a4205d4d1241cabbbbfb289bea925d222..afa2e4448689922cf63f2ccff4540ff08f949473 100644 (file)
@@ -51,14 +51,14 @@ class Contacts extends Module\BaseProfile
                        throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
                }
 
-               if (!empty($a->profile['hide-friends'])) {
+               $is_owner = $a->profile['uid'] == local_user();
+
+               if (!empty($a->profile['hide-friends']) && !$is_owner) {
                        throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
                }
 
                Nav::setSelected('home');
 
-               $is_owner = $a->profile['uid'] == local_user();
-
                $o = self::getTabsHTML($a, 'contacts', $is_owner, $nickname);
 
                $tabs = self::getContactFilterTabs('profile/' . $nickname, $type, Session::isAuthenticated() && $a->profile['uid'] != local_user());