Skip to content

Commit c0a0a34

Browse files
committed
Backport variable name updates and fix found porting the invalidation of sessions after removal of external login provider to 16.
1 parent 3d44a6f commit c0a0a34

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Umbraco.Core/Services/IUserService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ IEnumerable<IUser> GetAll(
236236
/// <summary>
237237
/// Invalidates sessions for users that aren't associated with the current collection of providers.
238238
/// </summary>
239-
/// <param name="currentProviderKeys">The keys for the currently configured providers.</param>
240-
void InvalidateSessionsForRemovedProviders(IEnumerable<string> currentProviderKeys) { }
239+
/// <param name="currentLoginProviders">The keys for the currently configured providers.</param>
240+
void InvalidateSessionsForRemovedProviders(IEnumerable<string> currentLoginProviders) { }
241241

242242
#region User groups
243243

src/Umbraco.Core/Services/UserService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,11 +721,11 @@ public IEnumerable<IUser> GetNextUsers(int id, int count)
721721
}
722722

723723
/// <inheritdoc />
724-
public void InvalidateSessionsForRemovedProviders(IEnumerable<string> currentProviderKeys)
724+
public void InvalidateSessionsForRemovedProviders(IEnumerable<string> currentLoginProviders)
725725
{
726726
using (ICoreScope scope = ScopeProvider.CreateCoreScope())
727727
{
728-
_userRepository.InvalidateSessionsForRemovedProviders(currentProviderKeys);
728+
_userRepository.InvalidateSessionsForRemovedProviders(currentLoginProviders);
729729
scope.Complete();
730730
}
731731
}

src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,13 +1071,13 @@ public IEnumerable<IUser> GetNextUsers(int id, int count)
10711071
}
10721072

10731073
/// <inheritdoc />
1074-
public void InvalidateSessionsForRemovedProviders(IEnumerable<string> currentProviderKeys)
1074+
public void InvalidateSessionsForRemovedProviders(IEnumerable<string> currentLoginProviders)
10751075
{
10761076
// Get all the user or member keys associated with the removed providers.
10771077
Sql<ISqlContext> idsQuery = SqlContext.Sql()
10781078
.Select<ExternalLoginDto>(x => x.UserOrMemberKey)
10791079
.From<ExternalLoginDto>()
1080-
.WhereNotIn<ExternalLoginDto>(x => x.ProviderKey, currentProviderKeys);
1080+
.WhereNotIn<ExternalLoginDto>(x => x.LoginProvider, currentLoginProviders);
10811081
List<Guid> userAndMemberKeysAssociatedWithRemovedProviders = Database.Fetch<Guid>(idsQuery);
10821082
if (userAndMemberKeysAssociatedWithRemovedProviders.Count == 0)
10831083
{

0 commit comments

Comments
 (0)