X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcal.php;h=e1cf91aa685dd4cceeca4a36140e860777f00ce1;hb=07ef1edfd6baefa10c22c44a4f85bad3d0034e8b;hp=1ac11dc98b80cb5d6d3798abbdc9189e41fb510f;hpb=c6b45a958e3b09bc8f3950a718c181dfc9e0b910;p=friendica.git diff --git a/mod/cal.php b/mod/cal.php index 1ac11dc98b..e1cf91aa68 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -1,6 +1,6 @@ profile = Profile::getByNickname($nick, $a->profile_uid); - + $a->profile = User::getOwnerDataByNick($nick); if (empty($a->profile)) { throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.')); } @@ -86,7 +84,7 @@ function cal_init(App $a) '$about' => BBCode::convert($a->profile['about']), ]); - $cal_widget = Widget\CalendarExport::getHTML(); + $cal_widget = Widget\CalendarExport::getHTML($user['uid']); if (empty(DI::page()['aside'])) { DI::page()['aside'] = ''; @@ -131,6 +129,9 @@ function cal_content(App $a) // Setup permissions structures $owner_uid = intval($a->data['user']['uid']); $nick = $a->data['user']['nickname']; + if (empty($a->profile)) { + throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.')); + } $contact_id = Session::getRemoteContactID($a->profile['uid']);