Skip to content

Commit

Permalink
fix(settings): Fix dependency injection
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Oct 28, 2024
1 parent e6c11e1 commit 35d6140
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apps/settings/lib/Settings/Personal/Security/Authtokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(
private ISession $session,
private IUserSession $userSession,
private IInitialState $initialState,
private ?string $uid,
private ?string $userId,
) {
}

Expand All @@ -54,7 +54,7 @@ public function getPriority(): int {
}

private function getAppTokens(): array {
$tokens = $this->tokenProvider->getTokenByUser($this->uid);
$tokens = $this->tokenProvider->getTokenByUser($this->userId);

try {
$sessionId = $this->session->getId();
Expand Down
4 changes: 2 additions & 2 deletions apps/settings/lib/Settings/Personal/Security/Password.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion apps/settings/lib/Settings/Personal/Security/TwoFactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(
MandatoryTwoFactor $mandatoryTwoFactor,
private IUserSession $userSession,
private IConfig $config,
private ?string $uid,
private ?string $userId,
) {
$this->providerLoader = $providerLoader;
$this->mandatoryTwoFactor = $mandatoryTwoFactor;
Expand Down
4 changes: 2 additions & 2 deletions apps/settings/lib/Settings/Personal/Security/WebAuthn.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class WebAuthn implements ISettings {

public function __construct(
PublicKeyCredentialMapper $mapper,
private string $uid,
private string $userId,
private IInitialStateService $initialStateService,
Manager $manager,
) {
Expand All @@ -37,7 +37,7 @@ public function getForm() {
$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', [
Expand Down

0 comments on commit 35d6140

Please sign in to comment.