summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-06-07 16:13:10 +0200
committerGitHub <noreply@github.com>2018-06-07 16:13:10 +0200
commitbe30c09e9e184f07a9ed58c893ae80c65cc89839 (patch)
tree8268137486156b907ebbe0857595fba5672a387c
parentc60c8ac675f19fe6d42317e09868236f7bb4a03a (diff)
parent48fb126505d3a73f2c117750fd9b2cebc6e1b8c2 (diff)
downloadnextcloud-server-be30c09e9e184f07a9ed58c893ae80c65cc89839.tar.gz
nextcloud-server-be30c09e9e184f07a9ed58c893ae80c65cc89839.zip
Merge pull request #9787 from nextcloud/notify-credentials-env
allow setting notify credentials in environment
-rw-r--r--apps/files_external/lib/Command/Notify.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php
index f649d36df78..04748117e27 100644
--- a/apps/files_external/lib/Command/Notify.php
+++ b/apps/files_external/lib/Command/Notify.php
@@ -106,9 +106,17 @@ class Notify extends Base {
if ($input->getOption('user')) {
$mount->setBackendOption('user', $input->getOption('user'));
+ } else if (isset($_ENV['NOTIFY_USER'])) {
+ $mount->setBackendOption('user', $_ENV['NOTIFY_USER']);
+ } else if (isset($_SERVER['NOTIFY_USER'])) {
+ $mount->setBackendOption('user', $_SERVER['NOTIFY_USER']);
}
if ($input->getOption('password')) {
$mount->setBackendOption('password', $input->getOption('password'));
+ } else if (isset($_ENV['NOTIFY_PASSWORD'])) {
+ $mount->setBackendOption('password', $_ENV['NOTIFY_PASSWORD']);
+ } else if (isset($_SERVER['NOTIFY_PASSWORD'])) {
+ $mount->setBackendOption('password', $_SERVER['NOTIFY_PASSWORD']);
}
try {