无法更改导入用户的主要邮箱

这对我来说奏效了

u=User.find_by_username("XXXXXX")
UserEmail.find_by(user_id: u.id).update(email: "XXXX@XXX.com")