diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-12-04 17:56:32 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-12-04 17:56:32 +0200 |
| commit | c63050d1b7f34c5e3c49bbe23e059ebe403e8b20 (patch) | |
| tree | 4034da7ff03b1ac63f176a7e8b0664097cf9c3e3 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | |
| parent | 89831e736d0262038a8aa7e0385ebdfe83d196c2 (diff) | |
| parent | 6150db333d81879d3aba19613cca67cb92b22774 (diff) | |
| download | Tango-c63050d1b7f34c5e3c49bbe23e059ebe403e8b20.tar.gz Tango-c63050d1b7f34c5e3c49bbe23e059ebe403e8b20.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
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.cs | 6 |
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; } |
