MS
This commit is contained in:
@@ -79,19 +79,20 @@ Public Class ClassInit
|
||||
End Sub
|
||||
Public Sub InitUserLogin()
|
||||
Try
|
||||
USER_USERNAME = Environment.UserName
|
||||
Dim sql = String.Format("SELECT MAX(GUID) FROM TBPM_USER WHERE LOWER(USERNAME) = LOWER('{0}')", Environment.UserName)
|
||||
ClassLogger.Add(">> Username: " & Environment.UserName, False)
|
||||
ClassLogger.Add(">> Username: " & USER_USERNAME, False)
|
||||
|
||||
CURRENT_USERID = ClassDatabase.Execute_Scalar(sql, MyConnectionString, True)
|
||||
If IsDBNull(CURRENT_USERID) Then
|
||||
ClassLogger.Add("User '" & Environment.UserName & "' not configured in Useradministration! (DBNull)", True)
|
||||
ClassLogger.Add("User '" & USER_USERNAME & "' not configured in Useradministration! (DBNull)", True)
|
||||
'MsgBox("Achtung: Sie sind nicht in der Userverwaltung hinterlegt." & vbNewLine & "Bitte setzen Sie sich mit dem Systembetreuer in Verbindung!", MsgBoxStyle.Critical, "Achtung:")
|
||||
'Me.Close()
|
||||
ERROR_STATE = "NO USER"
|
||||
Throw New Exception("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!")
|
||||
Else
|
||||
If IsNothing(CURRENT_USERID) Then
|
||||
ClassLogger.Add(" - User: " & Environment.UserName & " ' not configured in Useradministration! (nothing)", False)
|
||||
ClassLogger.Add(" - User: " & USER_USERNAME & " ' not configured in Useradministration! (nothing)", False)
|
||||
ERROR_STATE = "NO USER"
|
||||
Throw New Exception("You are not configured in the Useradministration." & vbNewLine & "Please contact the system administrator!")
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user