mirror of
https://github.com/friendica/friendica
synced 2024-11-10 02:22:55 +00:00
Issue 11470: Check for removed account
This commit is contained in:
parent
c7608983dc
commit
4ef7f42257
3 changed files with 3 additions and 3 deletions
|
@ -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.'));
|
||||
}
|
||||
|
||||
|
|
|
@ -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 [];
|
||||
}
|
||||
|
|
|
@ -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']);
|
||||
|
|
Loading…
Reference in a new issue