mirror of
https://github.com/friendica/friendica
synced 2025-04-29 15:04:22 +02:00
API: added account related endpoints
This commit is contained in:
parent
6511493fdf
commit
5bb5c44bd9
16 changed files with 599 additions and 13 deletions
|
@ -2763,11 +2763,12 @@ class Contact
|
|||
*
|
||||
* @param string $search Name or nick
|
||||
* @param string $mode Search mode (e.g. "community")
|
||||
* @param int $uid User ID
|
||||
*
|
||||
* @return array with search results
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public static function searchByName($search, $mode = '')
|
||||
public static function searchByName(string $search, string $mode = '', int $uid = 0)
|
||||
{
|
||||
if (empty($search)) {
|
||||
return [];
|
||||
|
@ -2800,7 +2801,7 @@ class Contact
|
|||
NOT `failed` AND `uid` = ? AND
|
||||
(`addr` LIKE ? OR `name` LIKE ? OR `nick` LIKE ?) $extra_sql
|
||||
ORDER BY `nurl` DESC LIMIT 1000",
|
||||
Protocol::DFRN, Protocol::ACTIVITYPUB, $ostatus, $diaspora, 0, $search, $search, $search
|
||||
Protocol::DFRN, Protocol::ACTIVITYPUB, $ostatus, $diaspora, $uid, $search, $search, $search
|
||||
);
|
||||
|
||||
$contacts = DBA::toArray($results);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue