aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/command/import.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/command/import.php')
-rw-r--r--apps/files_external/command/import.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/command/import.php b/apps/files_external/command/import.php
index fe27051359c..28032c207b5 100644
--- a/apps/files_external/command/import.php
+++ b/apps/files_external/command/import.php
@@ -194,8 +194,8 @@ class Import extends Base {
$mount = new StorageConfig($data['mount_id']);
$mount->setMountPoint($data['mount_point']);
$mount->setBackend($this->getBackendByClass($data['storage']));
- $authBackends = $this->backendService->getAuthMechanismsByScheme([$data['authentication_type']]);
- $mount->setAuthMechanism(current($authBackends));
+ $authBackend = $this->backendService->getAuthMechanism($data['authentication_type']);
+ $mount->setAuthMechanism($authBackend);
$mount->setBackendOptions($data['configuration']);
$mount->setMountOptions($data['options']);
$mount->setApplicableUsers(isset($data['applicable_users']) ? $data['applicable_users'] : []);