mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 22:17:22 +01:00
fix relink when secondary uids are present
This commit is contained in:
parent
6451dec563
commit
715bd87907
1 changed files with 1 additions and 1 deletions
|
|
@ -1053,7 +1053,7 @@ public class MareModule : InteractionModuleBase
|
||||||
|
|
||||||
var existingLodestoneAuth = db.LodeStoneAuth.Include(u => u.User).SingleOrDefault(u => u.DiscordId != cmd.User.Id && u.HashedLodestoneId == lodestoneAuth.HashedLodestoneId);
|
var existingLodestoneAuth = db.LodeStoneAuth.Include(u => u.User).SingleOrDefault(u => u.DiscordId != cmd.User.Id && u.HashedLodestoneId == lodestoneAuth.HashedLodestoneId);
|
||||||
|
|
||||||
var previousAuth = await db.Auth.FirstOrDefaultAsync(u => u.UserUID == existingLodestoneAuth.User.UID);
|
var previousAuth = await db.Auth.FirstOrDefaultAsync(u => u.UserUID == existingLodestoneAuth.User.UID && string.IsNullOrEmpty(u.PrimaryUserUID));
|
||||||
if (previousAuth != null)
|
if (previousAuth != null)
|
||||||
{
|
{
|
||||||
db.Auth.Remove(previousAuth);
|
db.Auth.Remove(previousAuth);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue