SignFlow: Bei Initialisierung prüfen, ob es überhaupt ein USER-Object gibt

This commit is contained in:
PitzM 2024-02-12 10:24:55 +01:00
parent 02a197e535
commit dd55e2a2d9

View File

@ -90,7 +90,9 @@ Public Class frmSplashScreen
Thread.Sleep(300)
' This checks for module access and admin rights
oUserModel.CheckUserLogin(oUser)
If oUser IsNot Nothing Then
oUserModel.CheckUserLogin(oUser)
End If
Worker.ReportProgress(100, "Starting Application")
Thread.Sleep(300)
@ -113,6 +115,10 @@ Public Class frmSplashScreen
Dim oState As State = DirectCast(e.Result, State)
If oState.User Is Nothing Or oState.UserId = 0 Then
Throw New ApplicationException($"User {Environment.UserName} is unknown. Please contact your administrator. Application will close!")
End If
Dim oCultureInfo As CultureInfo
oCultureInfo = New CultureInfo(oState.User.Language)
Thread.CurrentThread.CurrentCulture = oCultureInfo
@ -143,7 +149,4 @@ Public Class frmSplashScreen
End Try
End Sub
End Class