From: Michael Date: Sat, 28 May 2022 16:21:41 +0000 (+0000) Subject: Issue 11470: Check for removed account X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4ef7f422570cba0290c6984463f9c7f5a6f9caa4;p=friendica.git Issue 11470: Check for removed account --- 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']);