namespace OCA\User_LDAP\AppInfo;
use OCA\User_LDAP\Controller\RenewPasswordController;
+use OCA\User_LDAP\ILDAPWrapper;
+use OCA\User_LDAP\LDAP;
use OCP\AppFramework\App;
use OCP\AppFramework\IAppContainer;
use OCP\IL10N;
$server->getURLGenerator()
);
});
+
+ $container->registerService(ILDAPWrapper::class, function () {
+ return new LDAP();
+ });
}
}
namespace OCA\User_LDAP\Command;
+use OCA\User_LDAP\ConnectionFactory;
+use OCA\User_LDAP\LDAP;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
$configHolder = new Configuration($configID);
$configHolder->$key = $value;
$configHolder->saveConfiguration();
+
+ $connectionFactory = new ConnectionFactory(new LDAP());
+ $connectionFactory->get($configID)->clearCache();
}
}
use OC\Core\Controller\OCSController;
use OC\Security\IdentityProof\Manager;
use OCA\User_LDAP\Configuration;
+use OCA\User_LDAP\ConnectionFactory;
use OCA\User_LDAP\Helper;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSBadRequestException;
/** @var ILogger */
private $logger;
+ /** @var ConnectionFactory */
+ private $connectionFactory;
+
public function __construct(
$appName,
IRequest $request,
IUserManager $userManager,
Manager $keyManager,
Helper $ldapHelper,
- ILogger $logger
+ ILogger $logger,
+ ConnectionFactory $connectionFactory
) {
parent::__construct(
$appName,
$this->ldapHelper = $ldapHelper;
$this->logger = $logger;
+ $this->connectionFactory = $connectionFactory;
}
/**
}
$configuration->saveConfiguration();
+ $this->connectionFactory->get($configID)->clearCache();
} catch(OCSException $e) {
throw $e;
} catch (\Exception $e) {