mirror of
https://github.com/nextcloud/server.git
synced 2026-05-19 08:25:56 -04:00
Check if uploading to lookup server is enabled before verifying
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
fdc77e7052
commit
264e736d5e
1 changed files with 9 additions and 0 deletions
|
|
@ -60,6 +60,9 @@ class VerifyUserData extends Job {
|
|||
/** @var ILogger */
|
||||
private $logger;
|
||||
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
|
||||
/** @var string */
|
||||
private $lookupServerUrl;
|
||||
|
||||
|
|
@ -83,6 +86,7 @@ class VerifyUserData extends Job {
|
|||
$this->httpClientService = $clientService;
|
||||
$this->logger = $logger;
|
||||
|
||||
$this->config = $config;
|
||||
$lookupServerUrl = $config->getSystemValue('lookup_server', 'https://lookup.nextcloud.com');
|
||||
$this->lookupServerUrl = rtrim($lookupServerUrl, '/');
|
||||
}
|
||||
|
|
@ -182,6 +186,11 @@ class VerifyUserData extends Job {
|
|||
* @return bool true if we could check the verification code, otherwise false
|
||||
*/
|
||||
protected function verifyViaLookupServer(array $argument, $dataType) {
|
||||
if(empty($this->lookupServerUrl) ||
|
||||
$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') !== 'yes' ||
|
||||
$this->config->getSystemValue('has_internet_connection', true) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$user = $this->userManager->get($argument['uid']);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue