Issue 6553: Restructured code for treating removed accounts
This commit is contained in:
parent
c11bf8a14f
commit
9d87bc94a6
1 changed files with 5 additions and 5 deletions
|
@ -57,21 +57,21 @@ class Profile extends BaseModule
|
|||
{
|
||||
if (ActivityPub::isRequest()) {
|
||||
$user = DBA::selectFirst('user', ['uid'], ['nickname' => self::$which]);
|
||||
$data = [];
|
||||
if (DBA::isResult($user)) {
|
||||
$data = ActivityPub\Transmitter::getProfile($user['uid']);
|
||||
}
|
||||
|
||||
if (!empty($data)) {
|
||||
System::jsonExit($data, 'application/activity+json');
|
||||
} elseif (DBA::exists('userd', ['username' => self::$which])) {
|
||||
}
|
||||
}
|
||||
|
||||
if (DBA::exists('userd', ['username' => self::$which])) {
|
||||
// Known deleted user
|
||||
$data = ActivityPub\Transmitter::getDeletedUser(self::$which);
|
||||
|
||||
System::jsonError(410, $data);
|
||||
} else {
|
||||
// Any other case (unknown, blocked, unverified, expired, no profile, no self contact)
|
||||
System::jsonError(404, $data);
|
||||
System::jsonError(404, []);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue