Skip to content

Commit

Permalink
Fix user impersonation (#1041)
Browse files Browse the repository at this point in the history
Broken due to global query filters on DbPlayerUserData probably
  • Loading branch information
SapiensAnatis authored Aug 26, 2024
1 parent 80680b1 commit 752a6e8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ long targetViewerId
using IDisposable userImpersonation = this.StartUserImpersonation(viewerId);

string targetAccountId = this
.apiContext.Players.Include(x => x.UserData)
.apiContext.Players.IgnoreQueryFilters()
.Include(x => x.UserData)
.Where(x => x.UserData!.ViewerId == targetViewerId)
.Select(x => x.AccountId)
.First();
Expand Down

0 comments on commit 752a6e8

Please sign in to comment.