$this->systemMessages = $systemMessages;
$this->aclFormatter = $aclFormatter;
- $owner = Profile::load($this->app, $this->parameters['nickname'] ?? '');
+ $owner = Profile::load($this->app, $this->parameters['nickname'] ?? '', false);
if (!$owner || $owner['account_removed'] || $owner['account_expired']) {
throw new HTTPException\NotFoundException($this->t('User not found.'));
}
$owner_uid = $this->owner['uid'];
$is_owner = $this->session->getLocalUserId() == $owner_uid;
- $remote_contact = false;
- if ($this->session->getRemoteContactID($owner_uid)) {
- $contact_id = $this->session->getRemoteContactID($owner_uid);
-
- $contact = Contact::getContactForUser($contact_id, $owner_uid, ['blocked', 'pending']);
- $remote_contact = $contact && !$contact['blocked'] && !$contact['pending'];
- }
-
if ($this->owner['hidewall'] && !$this->session->isAuthenticated()) {
- $this->baseUrl->redirect('profile/' . $owner['nickname'] . '/restricted');
+ $this->baseUrl->redirect('profile/' . $this->owner['nickname'] . '/restricted');
}
$this->session->set('photo_return', $this->args->getCommand());
]);
}
+ // Removing vCard for owner
+ if ($is_owner) {
+ $this->page['aside'] = '';
+ }
+
if (!empty($photo_albums_widget)) {
$this->page['aside'] .= $photo_albums_widget;
}