kernal clean-up
This commit is contained in:
@@ -4,7 +4,7 @@ namespace KTXC\Service;
|
||||
|
||||
use KTXC\Identity\Provider\DefaultIdentityProvider;
|
||||
use KTXC\Models\Identity\User;
|
||||
use KTXC\Server;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use KTXC\SessionTenant;
|
||||
|
||||
/**
|
||||
@@ -18,7 +18,8 @@ class UserManagerService
|
||||
|
||||
public function __construct(
|
||||
private readonly SessionTenant $tenant,
|
||||
private readonly UserService $userService
|
||||
private readonly UserService $userService,
|
||||
private readonly ContainerInterface $container
|
||||
) {
|
||||
// Register the default identity provider
|
||||
$this->providerRegister('default', DefaultIdentityProvider::class);
|
||||
@@ -51,8 +52,7 @@ class UserManagerService
|
||||
$providerClass = $this->availableIdentityProviders[$identifier];
|
||||
|
||||
try {
|
||||
// Server::get automatically detects context from calling object
|
||||
$providerInstance = Server::runtimeContainer()->get($providerClass);
|
||||
$providerInstance = $this->container->get($providerClass);
|
||||
|
||||
// Cache the instance
|
||||
$this->cachedIdentityProviders[$identifier] = $providerInstance;
|
||||
|
||||
Reference in New Issue
Block a user