diff options
author | Robin Appelman <robin@icewind.nl> | 2018-06-07 15:33:58 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-06-07 15:33:58 +0200 |
commit | 48fb126505d3a73f2c117750fd9b2cebc6e1b8c2 (patch) | |
tree | d4129226f082a02bcef2a8f50269979987391dfa /apps/files_external/lib/Command/Notify.php | |
parent | 44c6d22b2222fa8f8107cef9718eefbb30434374 (diff) | |
download | nextcloud-server-48fb126505d3a73f2c117750fd9b2cebc6e1b8c2.tar.gz nextcloud-server-48fb126505d3a73f2c117750fd9b2cebc6e1b8c2.zip |
allow setting notify credentials in environment
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/lib/Command/Notify.php')
-rw-r--r-- | apps/files_external/lib/Command/Notify.php | 8 |
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 { |