Simply use "unsearchable" (and ensure it is updated for local users)
This commit is contained in:
parent
4c81a7ab91
commit
74222532dc
|
@ -3535,6 +3535,7 @@ class Contact
|
|||
'server-blocked' => false,
|
||||
'failed' => false,
|
||||
'deleted' => false,
|
||||
'unsearchable' => false,
|
||||
'uid' => $uid
|
||||
];
|
||||
|
||||
|
@ -3560,8 +3561,7 @@ class Contact
|
|||
}
|
||||
|
||||
$condition = DBA::mergeConditions($condition,
|
||||
["(NOT `unsearchable` OR `nurl` IN (SELECT `nurl` FROM `owner-view` WHERE `publish` OR `net-publish`))
|
||||
AND (`addr` LIKE ? OR `name` LIKE ? OR `nick` LIKE ?)", $search, $search, $search]);
|
||||
["(`addr` LIKE ? OR `name` LIKE ? OR `nick` LIKE ?)", $search, $search, $search]);
|
||||
|
||||
return DBA::selectToArray('account-user-view', [], $condition, $params);
|
||||
}
|
||||
|
|
11
update.php
11
update.php
|
@ -1315,3 +1315,14 @@ function update_1516()
|
|||
|
||||
return Update::SUCCESS;
|
||||
}
|
||||
|
||||
function update_1518()
|
||||
{
|
||||
$users = DBA::select('user', ['uid']);
|
||||
while ($user = DBA::fetch($users)) {
|
||||
Contact::updateSelfFromUserID($user['uid']);
|
||||
}
|
||||
DBA::close($users);
|
||||
|
||||
return Update::SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user