The query condition for active users are unified

This commit is contained in:
Michael
2023-09-08 15:01:51 +00:00
parent 692a633dc8
commit 7e73283949
19 changed files with 33 additions and 37 deletions

View File

@@ -3062,10 +3062,7 @@ class Diaspora
// If the item belongs to a user, we take this user id.
if ($item['uid'] == 0) {
// @todo Possibly use an administrator account?
$condition = [
'verified' => true, 'blocked' => false,
'account_removed' => false, 'account_expired' => false, 'account-type' => User::ACCOUNT_TYPE_PERSON
];
$condition = ['verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false, 'account-type' => User::ACCOUNT_TYPE_PERSON];
$first_user = DBA::selectFirst('user', ['uid'], $condition, ['order' => ['uid']]);
$owner = User::getOwnerDataById($first_user['uid']);
} else {