From 2ab765f2d79655ae96b6ccb8bb234af9395d959e Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Thu, 22 Jan 2026 15:17:19 +1100 Subject: [PATCH] bug: edge case where the assigned user is incorrectly set for login --- Disco.Client/Extensions/EnrolExtensions.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Disco.Client/Extensions/EnrolExtensions.cs b/Disco.Client/Extensions/EnrolExtensions.cs index af568e9f..64348bb3 100644 --- a/Disco.Client/Extensions/EnrolExtensions.cs +++ b/Disco.Client/Extensions/EnrolExtensions.cs @@ -7,9 +7,8 @@ using System.IO; namespace Disco.Client.Extensions { - public static class EnrolExtensions + internal static class EnrolExtensions { - public static void Build(this Enrol enrol) { enrol.ComputerName = Environment.MachineName; @@ -99,7 +98,7 @@ namespace Disco.Client.Extensions File.Delete(odjFile); // Flush Logged-On History - if (!string.IsNullOrEmpty(enrolResponse.DomainName)) + if (enrolResponse.SetAssignedUserForLogon && !string.IsNullOrEmpty(enrolResponse.DomainName)) { using (RegistryKey regWinlogon = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", true)) {