X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FContact%2FContacts.php;h=92235e85477e2240bf3fa82c0eaebb906bdc6ce4;hb=79235b6db1c9badd6c9602d54ad0d550e4bec2fd;hp=bfe689c1e3997a3c1fac3710509c2287d4b17c30;hpb=3bae52074a644b0ade3808bed9fc1268e1baa4e3;p=friendica.git diff --git a/src/Module/Contact/Contacts.php b/src/Module/Contact/Contacts.php index bfe689c1e3..92235e8547 100644 --- a/src/Module/Contact/Contacts.php +++ b/src/Module/Contact/Contacts.php @@ -1,4 +1,23 @@ . + * + */ namespace Friendica\Module\Contact; @@ -14,11 +33,9 @@ use Friendica\Network\HTTPException; class Contacts extends BaseModule { - public function content(): string + protected function content(array $request = []): string { - $app = DI::app(); - - if (!local_user()) { + if (!DI::userSession()->getLocalUserId()) { throw new HTTPException\ForbiddenException(); } @@ -36,7 +53,7 @@ class Contacts extends BaseModule throw new HTTPException\NotFoundException(DI::l10n()->t('Contact not found.')); } - $localContactId = Model\Contact::getPublicIdByUserId(local_user()); + $localContactId = Model\Contact::getPublicIdByUserId(DI::userSession()->getLocalUserId()); DI::page()['aside'] = Widget\VCard::getHTML($contact); @@ -122,7 +139,7 @@ class Contacts extends BaseModule '$paginate' => $pager->renderFull($total), ]); - DI::page()['aside'] .= Widget::accounttypes($_SERVER['REQUEST_URI'], $accounttype); + DI::page()['aside'] .= Widget::accountTypes($_SERVER['REQUEST_URI'], $accounttype); return $o; }