Skip to content

EspoCRM – Open Source CRM Application

external account client manager using factory

Yuri Kuznetsovebec204d3aab
diff --git a/application/Espo/Core/ExternalAccount/ClientManager.php b/application/Espo/Core/ExternalAccount/ClientManager.php
index 44781f4d88..72ce2d311e 100644
--- a/application/Espo/Core/ExternalAccount/ClientManager.php
+++ b/application/Espo/Core/ExternalAccount/ClientManager.php
@@ -248,10 +248,8 @@ class ClientManager
$params[$k] = $v;
}
- $client = new $className($oauth2Client, $params, $this);
-
if ($this->injectableFactory) {
- $this->injectableFactory->createWith($className, [
+ $client = $this->injectableFactory->createWith($className, [
'client' => $oauth2Client,
'params' => $params,
'manager' => $this,