Skip to content

Commit e421c56

Browse files
lfalsbackportbot-libresign[bot]
authored andcommitted
refactor(account-controller): use IUserConfig typed user config API
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
1 parent 5258211 commit e421c56

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/Controller/AccountController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
use OCP\AppFramework\Http\Attribute\PublicPage;
3131
use OCP\AppFramework\Http\Attribute\UseSession;
3232
use OCP\AppFramework\Http\DataResponse;
33-
use OCP\IConfig;
33+
use OCP\Config\IUserConfig;
3434
use OCP\IL10N;
3535
use OCP\IRequest;
3636
use OCP\IURLGenerator;
@@ -58,7 +58,7 @@ public function __construct(
5858
protected IUserSession $userSession,
5959
protected SessionService $sessionService,
6060
private ValidateHelper $validateHelper,
61-
private IConfig $config,
61+
private IUserConfig $userConfig,
6262
) {
6363
parent::__construct(Application::APP_ID, $request);
6464
}
@@ -419,7 +419,7 @@ public function setConfig(string $key): DataResponse {
419419
$value = json_encode($value);
420420
}
421421

422-
$this->config->setUserValue($user->getUID(), Application::APP_ID, $key, $value);
422+
$this->userConfig->setValueString($user->getUID(), Application::APP_ID, $key, $value);
423423

424424
return new DataResponse([
425425
'key' => $key,

0 commit comments

Comments
 (0)