- header("Content-type: application/atom+xml; charset=utf-8");
- echo ProtocolFeed::atom(static::$parameters['nickname'], $last_update, 10, $type, $nocache, true);
- exit();
+ $last_update = $this->getRequestValue($request, 'last_update', '');
+
+ $owner = User::getOwnerDataByNick($nick);
+ if (!$owner || $owner['account_expired'] || $owner['account_removed']) {
+ throw new HTTPException\NotFoundException($this->t('User not found.'));
+ }
+
+ if ($owner['blocked'] || $owner['hidewall']) {
+ throw new HTTPException\UnauthorizedException($this->t('Access to this profile has been restricted.'));
+ }
+
+ $feed = ProtocolFeed::atom($owner, $last_update, 10, $type);
+
+ System::httpExit($feed, Response::TYPE_ATOM);