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