use configured lookup server
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
parent
cbf5acca45
commit
866e5d6d05
|
@ -654,13 +654,14 @@ class ShareesAPIController extends OCSController {
|
||||||
|
|
||||||
protected function getLookup($search) {
|
protected function getLookup($search) {
|
||||||
$isEnabled = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'no');
|
$isEnabled = $this->config->getAppValue('files_sharing', 'lookupServerEnabled', 'no');
|
||||||
|
$lookupServerUrl = $this->config->getSystemValue('lookup_server', 'https://lookup.nextcloud.com');
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
if($isEnabled === 'yes') {
|
if($isEnabled === 'yes') {
|
||||||
try {
|
try {
|
||||||
$client = $this->clientService->newClient();
|
$client = $this->clientService->newClient();
|
||||||
$response = $client->get(
|
$response = $client->get(
|
||||||
'https://lookup.nextcloud.com/users?search=' . urlencode($search),
|
$lookupServerUrl . '/users?search=' . urlencode($search),
|
||||||
[
|
[
|
||||||
'timeout' => 10,
|
'timeout' => 10,
|
||||||
'connect_timeout' => 3,
|
'connect_timeout' => 3,
|
||||||
|
|
Loading…
Reference in New Issue