mirror of
https://github.com/bitwarden/server
synced 2026-01-06 02:23:51 +00:00
PM 12001 - Fix Empty User Search 500 (#4770)
* Setting null if user2Fa is empty. Added null check to view as well. * Not setting the temp data at all if empty.
This commit is contained in:
@@ -73,7 +73,9 @@
|
||||
@if (featureService.IsEnabled(Bit.Core.FeatureFlagKeys.MembersTwoFAQueryOptimization))
|
||||
{
|
||||
var usersTwoFactorIsEnabled = TempData["UsersTwoFactorIsEnabled"] as IEnumerable<(Guid userId, bool twoFactorIsEnabled)>;
|
||||
@if(usersTwoFactorIsEnabled.FirstOrDefault(tuple => tuple.userId == user.Id).twoFactorIsEnabled)
|
||||
var matchingUser2Fa = usersTwoFactorIsEnabled?.FirstOrDefault(tuple => tuple.userId == user.Id);
|
||||
|
||||
@if(matchingUser2Fa is { twoFactorIsEnabled: true })
|
||||
{
|
||||
<i class="fa fa-lock fa-lg fa-fw" title="2FA Enabled"></i>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user