6 writes to Id
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (5)
UserStoreEncryptPersonalDataTest.cs (1)
203
user.
Id
= guid;
UserStoreGuidKeyTest.cs (1)
13
Id
= Guid.NewGuid();
UserStoreStringKeyTest.cs (1)
13
Id
= Guid.NewGuid().ToString();
UserStoreTest.cs (1)
34
db.Users.Add(new IdentityUser {
Id
= guid, UserName = guid });
UserStoreWithGenericsTest.cs (1)
195
Id
= Guid.NewGuid().ToString();
Microsoft.Extensions.Identity.Stores (1)
IdentityUser.cs (1)
21
Id
= Guid.NewGuid().ToString();
66 references to Id
Identity.ExternalClaims (18)
Pages\Account\ForgotPassword.cshtml.cs (1)
51
var callbackUrl = Url.ResetPasswordCallbackLink(user.
Id
, code, Request.Scheme);
Pages\Account\LoginWith2fa.cshtml.cs (3)
82
_logger.LogInformation("User with ID '{UserId}' logged in with 2fa.", user.
Id
);
87
_logger.LogWarning("User with ID '{UserId}' account locked out.", user.
Id
);
92
_logger.LogWarning("Invalid authenticator code entered for user with ID '{UserId}'.", user.
Id
);
Pages\Account\LoginWithRecoveryCode.cshtml.cs (3)
75
_logger.LogInformation("User with ID '{UserId}' logged in with a recovery code.", user.
Id
);
80
_logger.LogWarning("User with ID '{UserId}' account locked out.", user.
Id
);
85
_logger.LogWarning("Invalid recovery code entered for user with ID '{UserId}' ", user.
Id
);
Pages\Account\Manage\EnableAuthenticator.cshtml.cs (1)
101
_logger.LogInformation("User with ID '{UserId}' has enabled 2FA with an authenticator app.", user.
Id
);
Pages\Account\Manage\ExternalLogins.cshtml.cs (3)
65
throw new ApplicationException($"Unexpected error occurred removing external login for user with ID '{user.
Id
}'.");
95
throw new ApplicationException($"Unexpected error occurred loading external login info for user with ID '{user.
Id
}'.");
101
throw new ApplicationException($"Unexpected error occurred adding external login for user with ID '{user.
Id
}'.");
Pages\Account\Manage\GenerateRecoveryCodes.cshtml.cs (2)
41
throw new ApplicationException($"Cannot generate recovery codes for user with ID '{user.
Id
}' as they do not have 2FA enabled.");
47
_logger.LogInformation("User with ID '{UserId}' has generated new 2FA recovery codes.", user.
Id
);
Pages\Account\Manage\Index.cshtml.cs (3)
94
throw new ApplicationException($"Unexpected error occurred setting email for user with ID '{user.
Id
}'.");
103
throw new ApplicationException($"Unexpected error occurred setting phone number for user with ID '{user.
Id
}'.");
124
var callbackUrl = Url.EmailConfirmationLink(user.
Id
, code, Request.Scheme);
Pages\Account\Manage\ResetAuthenticator.cshtml.cs (1)
49
_logger.LogInformation("User with ID '{UserId}' has reset their authentication app key.", user.
Id
);
Pages\Account\Register.cshtml.cs (1)
78
var callbackUrl = Url.EmailConfirmationLink(user.
Id
, code, Request.Scheme);
IdentitySample.DefaultUI (3)
Areas\Identity\Pages\Account\Manage\Index.cshtml.cs (2)
95
throw new InvalidOperationException($"Unexpected error ocurred updating the profile for user with ID '{user.
Id
}'");
103
throw new InvalidOperationException($"Unexpected error occurred setting phone number for user with ID '{user.
Id
}'.");
Areas\Identity\Pages\Account\Register.cshtml.cs (1)
99
values: new { userId = user.
Id
, code = code },
Microsoft.AspNetCore.Identity.EntityFrameworkCore (22)
IdentityUserContext.cs (2)
169
b.HasKey(u => u.
Id
);
263
b.HasKey(u => u.
Id
);
UserOnlyStore.cs (8)
257
return Users.SingleOrDefaultAsync(u => u.
Id
.Equals(userId), cancellationToken);
296
return await UserClaims.Where(uc => uc.UserId.Equals(user.
Id
)).Select(c => c.ToClaim()).ToListAsync(cancellationToken);
333
var matchedClaims = await UserClaims.Where(uc => uc.UserId.Equals(user.
Id
) && uc.ClaimValue == claim.Value && uc.ClaimType == claim.Type).ToListAsync(cancellationToken);
355
var matchedClaims = await UserClaims.Where(uc => uc.UserId.Equals(user.
Id
) && uc.ClaimValue == claim.Value && uc.ClaimType == claim.Type).ToListAsync(cancellationToken);
395
var entry = await FindUserLoginAsync(user.
Id
, loginProvider, providerKey, cancellationToken);
415
var userId = user.
Id
;
473
join user in Users on userclaims.UserId equals user.
Id
490
=> UserTokens.FindAsync(new object[] { user.
Id
, loginProvider, name }, cancellationToken).AsTask();
UserStore.cs (12)
282
return Users.SingleOrDefaultAsync(u => u.
Id
.Equals(userId), cancellationToken);
349
var userRole = await FindUserRoleAsync(user.
Id
, roleEntity.Id, cancellationToken);
368
var userId = user.
Id
;
394
var userRole = await FindUserRoleAsync(user.
Id
, role.Id, cancellationToken);
411
return await UserClaims.Where(uc => uc.UserId.Equals(user.
Id
)).Select(c => c.ToClaim()).ToListAsync(cancellationToken);
448
var matchedClaims = await UserClaims.Where(uc => uc.UserId.Equals(user.
Id
) && uc.ClaimValue == claim.Value && uc.ClaimType == claim.Type).ToListAsync(cancellationToken);
470
var matchedClaims = await UserClaims.Where(uc => uc.UserId.Equals(user.
Id
) && uc.ClaimValue == claim.Value && uc.ClaimType == claim.Type).ToListAsync(cancellationToken);
510
var entry = await FindUserLoginAsync(user.
Id
, loginProvider, providerKey, cancellationToken);
530
var userId = user.
Id
;
588
join user in Users on userclaims.UserId equals user.
Id
615
join user in Users on userrole.UserId equals user.
Id
633
=> UserTokens.FindAsync(new object[] { user.
Id
, loginProvider, name }, cancellationToken).AsTask();
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (18)
SqlStoreOnlyUsersTestBase.cs (3)
146
IdentityResultAssert.IsSuccess(await manager.AddLoginAsync(user, new UserLoginInfo("provider", user.
Id
.ToString(), "display")));
168
var userById = await manager.FindByIdAsync(user.
Id
.ToString());
198
var userByLogin = await manager.FindByLoginAsync("provider", user.
Id
.ToString());
SqlStoreTestBase.cs (3)
248
IdentityResultAssert.IsSuccess(await manager.AddLoginAsync(user, new UserLoginInfo("provider", user.
Id
.ToString(), "display")));
274
var userById = await manager.FindByIdAsync(user.
Id
.ToString());
304
var userByLogin = await manager.FindByLoginAsync("provider", user.
Id
.ToString());
UserOnlyCustomContextTest.cs (1)
26
b.HasKey(u => u.
Id
);
UserStoreGuidKeyTest.cs (1)
14
UserName =
Id
.ToString();
UserStoreStringKeyTest.cs (1)
14
UserName =
Id
;
UserStoreTest.cs (5)
225
var user1 = await manager1.FindByIdAsync(user.
Id
);
226
var user2 = await manager2.FindByIdAsync(user.
Id
);
256
var user2 = await manager2.FindByIdAsync(user.
Id
);
285
var user1 = await manager1.FindByIdAsync(user.
Id
);
286
var user2 = await manager2.FindByIdAsync(user.
Id
);
UserStoreWithGenericsTest.cs (4)
213
UserId = user.
Id
,
220
return new IdentityUserClaimWithIssuer { UserId = user.
Id
, ClaimType = claim.Type, ClaimValue = claim.Value, Issuer = claim.Issuer };
227
UserId = user.
Id
,
239
UserId = user.
Id
,
Microsoft.Extensions.Identity.Stores (5)
UserStoreBase.cs (5)
69
var userClaim = new TUserClaim { UserId = user.
Id
};
84
UserId = user.
Id
,
103
UserId = user.
Id
,
121
return Task.FromResult(ConvertIdToString(user.
Id
)!);
1025
UserId = user.
Id
,