Browse Source

fix(user_ldap): Fix configuration creation and copy

The endpoint was not correctly registering the new prefix.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/55475/head
Côme Chilliet 5 days ago
parent
commit
12e2a0e284
No known key found for this signature in database GPG Key ID: A3E2F658B28C760A
  1. 6
      apps/user_ldap/ajax/getNewServerConfigPrefix.php

6
apps/user_ldap/ajax/getNewServerConfigPrefix.php

@ -15,11 +15,7 @@ use OCP\Server;
\OC_JSON::callCheck();
$helper = Server::get(Helper::class);
$serverConnections = $helper->getServerConfigurationPrefixes();
sort($serverConnections);
$lk = array_pop($serverConnections);
$ln = (int)str_replace('s', '', $lk);
$nk = 's' . str_pad((string)($ln + 1), 2, '0', STR_PAD_LEFT);
$nk = $helper->getNextServerConfigurationPrefix();
$resultData = ['configPrefix' => $nk];

Loading…
Cancel
Save