]> git.mxchange.org Git - friendica.git/commitdiff
Issue 11470: Check for removed account
authorMichael <heluecht@pirati.ca>
Sat, 28 May 2022 16:21:41 +0000 (16:21 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 28 May 2022 16:21:41 +0000 (16:21 +0000)
mod/photos.php
src/Model/Profile.php
src/Module/Profile/Profile.php

index 52d749bb46f841f3f37e93fc91d76506ba261dd5..1374b8543293840f5f8137056ffa0d7d733400a0 100644 (file)
@@ -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.'));
                }
 
index 5fbfc4ba5abe06881ab564dc189905cae582f37b..46c5b542423f401848880d173ac11b952426b112 100644 (file)
@@ -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 [];
                }
index 199b96e2c976e4f10b8ff69b5f5e42da1583e310..ccc3208b60bc3b02561ec97887115ef129214b3b 100644 (file)
@@ -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']);