fix(settings): Fix dependency injection

Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
provokateurin 2024-10-28 08:14:17 +01:00
parent e6c11e1be0
commit 35d614057c
No known key found for this signature in database
4 changed files with 7 additions and 7 deletions

View file

@ -27,7 +27,7 @@ class Authtokens implements ISettings {
private ISession $session,
private IUserSession $userSession,
private IInitialState $initialState,
private ?string $uid,
private ?string $userId,
) {
}
@ -54,7 +54,7 @@ class Authtokens implements ISettings {
}
private function getAppTokens(): array {
$tokens = $this->tokenProvider->getTokenByUser($this->uid);
$tokens = $this->tokenProvider->getTokenByUser($this->userId);
try {
$sessionId = $this->session->getId();

View file

@ -16,12 +16,12 @@ class Password implements ISettings {
public function __construct(
private IUserManager $userManager,
private ?string $uid,
private ?string $userId,
) {
}
public function getForm(): TemplateResponse {
$user = $this->userManager->get($this->uid);
$user = $this->userManager->get($this->userId);
$passwordChangeSupported = false;
if ($user !== null) {
$passwordChangeSupported = $user->canChangePassword();

View file

@ -35,7 +35,7 @@ class TwoFactor implements ISettings {
MandatoryTwoFactor $mandatoryTwoFactor,
private IUserSession $userSession,
private IConfig $config,
private ?string $uid,
private ?string $userId,
) {
$this->providerLoader = $providerLoader;
$this->mandatoryTwoFactor = $mandatoryTwoFactor;

View file

@ -25,7 +25,7 @@ class WebAuthn implements ISettings {
public function __construct(
PublicKeyCredentialMapper $mapper,
private string $uid,
private string $userId,
private IInitialStateService $initialStateService,
Manager $manager,
) {
@ -37,7 +37,7 @@ class WebAuthn implements ISettings {
$this->initialStateService->provideInitialState(
Application::APP_ID,
'webauthn-devices',
$this->mapper->findAllForUid($this->uid)
$this->mapper->findAllForUid($this->userId)
);
return new TemplateResponse('settings', 'settings/personal/security/webauthn', [