1
0
mirror of https://github.com/bitwarden/server synced 2025-12-20 10:13:39 +00:00

choose other emails when primary not available (#2188)

This commit is contained in:
Kyle Spearrin
2022-08-15 09:44:38 -04:00
committed by GitHub
parent 5cbdee1379
commit a89bfdfe2b
2 changed files with 6 additions and 0 deletions

View File

@@ -135,6 +135,11 @@ namespace Bit.Scim.Controllers.v2
email = model.UserName?.ToLowerInvariant();
break;
default:
email = model.WorkEmail?.ToLowerInvariant();
if (string.IsNullOrWhiteSpace(email))
{
email = model.Emails?.FirstOrDefault()?.Value?.ToLowerInvariant();
}
break;
}
}