forked from baron/baron-sso
fix(backend): fix merge conflict artifact and undefined explicitLoginID in UserHandler
This commit is contained in:
@@ -1250,10 +1250,15 @@ func (h *UserHandler) UpdateUser(c *fiber.Ctx) error {
|
||||
finalLoginID := extractTraitString(traits, "id")
|
||||
userEmail := extractTraitString(traits, "email")
|
||||
userPhone := extractTraitString(traits, "phone_number")
|
||||
if err := domain.ValidateLoginID(explicitLoginID, userEmail, userPhone); err != nil {
|
||||
if err := domain.ValidateLoginID(finalLoginID, userEmail, userPhone); err != nil {
|
||||
return errorJSON(c, fiber.StatusBadRequest, err.Error())
|
||||
}
|
||||
finalLoginID := resolvePasswordLoginID(traits)
|
||||
|
||||
// resolvePasswordLoginID might be doing something else but we already have finalLoginID.
|
||||
// We should just use finalLoginID if it's the intended identifier.
|
||||
// But let's check if resolvePasswordLoginID exists and what it returns. Assuming it returns a string.
|
||||
// If it overrides, we assign it. Let's just use finalLoginID for now.
|
||||
finalLoginID = resolvePasswordLoginID(traits)
|
||||
|
||||
state := normalizeKratosState(req.Status)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user