diff --git a/mod/photos.php b/mod/photos.php index 52d749bb46..1374b85432 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -65,7 +65,7 @@ function photos_init(App $a) { if (DI::args()->getArgc() > 1) { $owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]); - if (!$owner) { + if (empty($owner) || $owner['account_removed']) { throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.')); } diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 5fbfc4ba5a..46c5b54242 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -220,7 +220,7 @@ class Profile public static function load(App $a, string $nickname, bool $show_contacts = true) { $profile = User::getOwnerDataByNick($nickname); - if (empty($profile)) { + if (empty($profile) || $profile['account_removed']) { Logger::info('profile error: ' . DI::args()->getQueryString()); return []; } diff --git a/src/Module/Profile/Profile.php b/src/Module/Profile/Profile.php index 199b96e2c9..ccc3208b60 100644 --- a/src/Module/Profile/Profile.php +++ b/src/Module/Profile/Profile.php @@ -49,7 +49,7 @@ class Profile extends BaseProfile protected function rawContent(array $request = []) { if (ActivityPub::isRequest()) { - $user = DBA::selectFirst('user', ['uid'], ['nickname' => $this->parameters['nickname']]); + $user = DBA::selectFirst('user', ['uid'], ['nickname' => $this->parameters['nickname'], 'account_removed' => false]); if (DBA::isResult($user)) { try { $data = ActivityPub\Transmitter::getProfile($user['uid']);