summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_external/lib/irods.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/files_external/lib/irods.php b/apps/files_external/lib/irods.php
index f7279a6c5d2..2e5d3fb16a6 100644
--- a/apps/files_external/lib/irods.php
+++ b/apps/files_external/lib/irods.php
@@ -27,12 +27,11 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{
private $auth_mode;
public function __construct($params) {
- if (isset($params['host']) && isset($params['user']) && isset($params['password'])) {
- $this->host = $params['host'];
- $this->port = $params['port'];
- $this->user = $params['user'];
- $this->password = $params['password'];
- $this->use_logon_credentials = $params['use_logon_credentials'];
+ if (isset($params['host'])) {
+ $this->port = isset($params['port']) ? $params['port'] : 1247;
+ $this->user = isset($params['user']) ? $params['user'] : '';
+ $this->password = isset($params['password']) ? $params['password'] : '';
+ $this->use_logon_credentials = ($params['use_logon_credentials'] === 'true');
$this->zone = $params['zone'];
$this->auth_mode = isset($params['auth_mode']) ? $params['auth_mode'] : '';