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:47:36 +0200 |
commit | 642bdb5bb52f322f42a0b814c78fa345476e1a50 (patch) | |
tree | 1b07bc4f1e07823a70ab1d650232a57591eaf4e8 /apps | |
parent | af2ecbbd5a81d8e1621ecda1784a99adb0fc43dd (diff) | |
download | nextcloud-server-642bdb5bb52f322f42a0b814c78fa345476e1a50.tar.gz nextcloud-server-642bdb5bb52f322f42a0b814c78fa345476e1a50.zip |
allow setting notify credentials in environment
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-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 { |