Do not crash if we have a new user without a username yet
This commit is contained in:
@@ -41,6 +41,7 @@ async function setProfileConfig(profileConfig, options, auditSource) {
|
||||
for (const user of allUsers) {
|
||||
if (user.twoFactorAuthenticationEnabled) continue;
|
||||
if (options.persistUserIdSessions === user.id) continue; // do not logout the API caller
|
||||
if (!user.username) continue; // if a user has no username set yet
|
||||
|
||||
await tokens.delByUserIdAndType(user.id, oidcClients.ID_WEBADMIN);
|
||||
await oidcServer.revokeByUsername(user.username);
|
||||
|
||||
Reference in New Issue
Block a user