diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index 6b6123a0..b9863941 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -35,8 +35,15 @@ public function __construct(string $appName, IRequest $request, WebAuthnManager * @UseSession */ public function startRegister(): JSONResponse { - return new JSONResponse($this->manager->startRegistration($this->userSession->getUser(), $this->request->getServerHost())); + $user = $this->userSession->getUser(); + $options = $this->manager->startRegistration($user, $this->request->getServerHost()); + $data = json_decode(json_encode($options), true); + if (isset($data['user']['displayName'])) { + $data['user']['displayName'] = $user->getUID(); + } + return new JSONResponse($data); } + /** * @NoAdminRequired