X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FContact%2FAdvanced.php;h=bcf48da1ff2ef0742b9c9602d9e8e076a948a816;hb=1d6f5c33a1a7c538d4e529d22701fd735855da15;hp=2c13800de6f2cf924abed78351edd4afd8c804cc;hpb=de6eabde581e219e41f5f66ff59360a3b24ea772;p=friendica.git diff --git a/src/Module/Contact/Advanced.php b/src/Module/Contact/Advanced.php index 2c13800de6..bcf48da1ff 100644 --- a/src/Module/Contact/Advanced.php +++ b/src/Module/Contact/Advanced.php @@ -1,6 +1,6 @@ dba = $dba; $this->page = $page; - if (!Session::isAuthenticated()) { + if (!DI::userSession()->isAuthenticated()) { throw new ForbiddenException($this->t('Permission denied.')); } } @@ -66,7 +65,7 @@ class Advanced extends BaseModule { $cid = $this->parameters['id']; - $contact = Model\Contact::selectFirst([], ['id' => $cid, 'uid' => Session::getLocalUser()]); + $contact = Model\Contact::selectFirst([], ['id' => $cid, 'uid' => DI::userSession()->getLocalUserId()]); if (empty($contact)) { throw new BadRequestException($this->t('Contact not found.')); } @@ -87,7 +86,7 @@ class Advanced extends BaseModule 'nurl' => $nurl, 'poll' => $poll, ], - ['id' => $contact['id'], 'uid' => Session::getLocalUser()] + ['id' => $contact['id'], 'uid' => DI::userSession()->getLocalUserId()] ); if ($photo) { @@ -105,7 +104,7 @@ class Advanced extends BaseModule { $cid = $this->parameters['id']; - $contact = Model\Contact::selectFirst([], ['id' => $cid, 'uid' => Session::getLocalUser()]); + $contact = Model\Contact::selectFirst([], ['id' => $cid, 'uid' => DI::userSession()->getLocalUserId()]); if (empty($contact)) { throw new BadRequestException($this->t('Contact not found.')); }