From 7333a1c1da9824370880f01d9aba10e0c3f869a6 Mon Sep 17 00:00:00 2001 From: agnisa-cap Date: Fri, 22 Sep 2023 13:48:27 +0200 Subject: [PATCH] N21-1269 change pseudonym display (#3311) --- controllers/oauth2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/oauth2.js b/controllers/oauth2.js index aadc175442..3e0c6c9731 100644 --- a/controllers/oauth2.js +++ b/controllers/oauth2.js @@ -155,7 +155,7 @@ router.get('/username/:pseudonym', async (req, res, next) => { qs: { id: pseudonymResponse.userId }, $limit: 1, }); - if (userResponse.data?.length === 1) { + if (userResponse.data.length) { completeName = `${userResponse.data[0].firstName} ${userResponse.data[0].lastName}`; shortName = `${userResponse.data[0].firstName} ${userResponse.data[0].lastName.charAt(0)}.`; }