summaryrefslogtreecommitdiffstats
path: root/settings/Application.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-10-24 14:51:15 +0200
committerGitHub <noreply@github.com>2018-10-24 14:51:15 +0200
commitdf6e9109c8d2f4d461073a0e6f69d6fd7b67d0e3 (patch)
tree4148415b3f3d9261857e7e81b85efe278492a6f3 /settings/Application.php
parent37718ddc0a82bf4207a56d5dc36b99667650a56e (diff)
parent20a5ce217a47c9e3d5dd4016e96e0cc557c51417 (diff)
downloadnextcloud-server-df6e9109c8d2f4d461073a0e6f69d6fd7b67d0e3.tar.gz
nextcloud-server-df6e9109c8d2f4d461073a0e6f69d6fd7b67d0e3.zip
Merge pull request #11396 from nextcloud/wellknown-webfinger
adding .well-known/webfinger
Diffstat (limited to 'settings/Application.php')
-rw-r--r--settings/Application.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/settings/Application.php b/settings/Application.php
index 4ad59a64d40..4a144082427 100644
--- a/settings/Application.php
+++ b/settings/Application.php
@@ -121,6 +121,8 @@ class Application extends App {
Util::connectHook('OC_User', 'post_setPassword', $this, 'onChangePassword');
Util::connectHook('OC_User', 'changeUser', $this, 'onChangeInfo');
+
+ Util::connectHook('\OCP\Config', 'js', $this, 'extendJsConfig');
}
/**
@@ -152,4 +154,18 @@ class Application extends App {
$hooks = $this->getContainer()->query(Hooks::class);
$hooks->onChangeEmail($parameters['user'], $parameters['old_value']);
}
+
+ /**
+ * @param array $settings
+ */
+ public function extendJsConfig(array $settings) {
+ $appConfig = json_decode($settings['array']['oc_appconfig'], true);
+
+ $publicWebFinger = \OC::$server->getConfig()->getAppValue('core', 'public_webfinger', '');
+ if (!empty($publicWebFinger)) {
+ $appConfig['core']['public_webfinger'] = $publicWebFinger;
+ }
+
+ $settings['array']['oc_appconfig'] = json_encode($appConfig);
+ }
}