sananirajabov / FindPairGame

Find Pair Game in C#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FindPairGame

Find Pair Game in C#

public function getContacts(IUser $user, $filter) { $allContacts = $this->contactsManager->search($filter ?: '', [ 'UID', 'FN', 'EMAIL', ]);

	$sharedContacts = [];

    $conn = \OC::$server->getDatabaseConnection();
    $sharedWith = $conn->executeQuery('SELECT * FROM oc_share');

    while ($row = $sharedWith->fetch()) {
        for ($i = 0; $i < count($allContacts); $i++) {
            if ($row['share_with'] == $allContacts[$i]['UID']) {
                $sharedContacts[] = $allContacts[$i];
            }
        }
    }

	$entries = array_map(function(array $contact) {
		return $this->contactArrayToEntry($contact);
	}, $sharedContacts);

	return $this->filterContacts(
		$user,
		$entries,
        $filter
	);
}

About

Find Pair Game in C#


Languages

Language:C# 100.0%