Is there a way to get the User Name in the On Server Open Connection Database 
Method


On Server Open Connection Database Method

$1              Longint         [in]            User ID number used internally 
by 4D Server to identify users


GET USER LIST
userNumbers             Longint array           [in]            Corresponding 
unique user ID numbers
These two User IDs appear to be unrelated ???

[ServerLog]UserName is always assigned “UNKNOWN"


  // On Server Open Connection Database Method
C_LONGINT($0;$1;$2;$3)
  // Create a [ServerLog] record
CREATE RECORD([ServerLog])
  //  [ServerLog]UniqueID  set to Auto Increment
  // Save the Log Date and Time
[ServerLog]DateSignOn:=Current date
[ServerLog]TimeSignOn:=Current time
[ServerLog]dtSignOn:=jDateTimeEnter
  // Save the connection information
[ServerLog]UserID:=$1
[ServerLog]ConnectionID:=$2

ARRAY TEXT($atUserNames;0)
ARRAY LONGINT($aiUserNumbers;0)

GET USER LIST($atUserNames;$aiUserNumbers)

$vi1:=Find in array($aiUserNumbers;[ServerLog]UserID)
If ($vi1>0)
[ServerLog]UserName:=$atUserNames{$vi1}
Else
[ServerLog]UserName:="UNKNOWN"
End if

SAVE RECORD([ServerLog])
  // Returns no error so that the connection can continue
$0:=0





Confidentiality Notice:
The information transmitted is intended only for the person or entity to which 
it is addressed and may contain information that is confidential, subject to 
copyright, or constitutes a trade secret. If you are not the intended 
recipient, you are hereby notified that your access is unauthorized, and any 
review, dissemination, distribution or copying of this message including any 
attachments is strictly prohibited. If you are not the intended recipient, 
please reply to the sender and permanently delete the original and any copy, 
including printed copies, of this message and any attachments.
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to