mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 12:34:14 +01:00
fix purging of users with secondary uids I guess
This commit is contained in:
parent
9b87e3c625
commit
cc304d5f54
1 changed files with 8 additions and 0 deletions
|
|
@ -41,6 +41,14 @@ public static class SharedDbFunctions
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Purging user: {uid}", user.UID);
|
_logger.LogInformation("Purging user: {uid}", user.UID);
|
||||||
|
|
||||||
|
var secondaryUsers = await dbContext.Auth.Include(u => u.PrimaryUser)
|
||||||
|
.Where(u => u.PrimaryUserUID == user.UID).Select(c => c.User).ToListAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
|
foreach (var secondaryUser in secondaryUsers)
|
||||||
|
{
|
||||||
|
await PurgeUser(_logger, secondaryUser, dbContext, maxGroupsByUser).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
var lodestone = dbContext.LodeStoneAuth.SingleOrDefault(a => a.User.UID == user.UID);
|
var lodestone = dbContext.LodeStoneAuth.SingleOrDefault(a => a.User.UID == user.UID);
|
||||||
|
|
||||||
var userProfileData = await dbContext.UserProfileData.SingleOrDefaultAsync(u => u.UserUID == user.UID).ConfigureAwait(false);
|
var userProfileData = await dbContext.UserProfileData.SingleOrDefaultAsync(u => u.UserUID == user.UID).ConfigureAwait(false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue