I have logic scattered around a db that tracks the user's window ID and time stamps when certain items are changed on the DB.
this works fine, i use the FOSusername as described below:
Code:
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Function fOSUserName() As String
' Returns the network login name
Dim lngLen As Long, lngX As Long
Dim strUserName As String
strUserName = String$(254, 0)
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If (lngX > 0) Then
fOSUserName = Left$(strUserName, lngLen - 1)
Else
fOSUserName = vbNullString
End If
End Function
This works great, but we recently began using Sentillion Single Sign on on some workstations - this basically has a user 'Sentillion' logged onto the workstation and folks can swipe an RFID badge and log onto the pc. Their user sort of sits on top of the sentillion user.
Now when my DB stamps the user ID, it shows the id of sentillion, not the user who is logged on over sentillion.
Is there a different set of logic needed to get around this and show the user's ID not the Sentillion ID? I have tried the environ("username"), but that shows 'Sentillion' too.
Has anyone used Sentillion and is there a work around so it shows the true user id, not Sentillion?
Thanks for any suggestions -