aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
index 5598362be..281e54958 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
@@ -74,10 +74,12 @@ namespace Tango.PPC.UI.ViewModels
{
using (ObservablesContext db = ObservablesContext.CreateDefault())
{
- if (db.Users.Count() == 1)
+ var machine = await db.Machines.FirstAsync();
+
+ if (db.Users.Count() == 1 || machine.AutoLogin)
{
var user = await db.Users.FirstAsync();
- LogManager.Log($"Application started. Single user detected ({user.Email}). Skipping LoginView...");
+ LogManager.Log($"Application started. Single user/Auto login detected ({user.Email}). Skipping LoginView...");
await AuthenticationProvider.Login(user.Email, user.Password, false);
IsLoading = false;
}