From 48fb126505d3a73f2c117750fd9b2cebc6e1b8c2 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 7 Jun 2018 15:33:58 +0200 Subject: allow setting notify credentials in environment Signed-off-by: Robin Appelman --- apps/files_external/lib/Command/Notify.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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 { -- cgit v1.2.3