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.'));
}
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 [];
}
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']);