intelliolz.blogg.se

How to logout in citect
How to logout in citect










how to logout in citect

** Function: UserLogAction("Action Text") UserName = "No User Logged In" //If no users are logged in then display "No User Logged In" UserName = UserInfo(2) //If a user has logged in then display Current User Name. SleepMS(500) //Provide Delay For User Data to Update ** Use: Displays The Name of the Currently Logged In User. ** Called From: UserLogOutInfo(), UserLogInInfo() and Initialise() ** Use: Trap User Name, Date and Time of a user login.ĭevWriteLn(hDevice,TimeToStr(TimeCurrent(),4)+ " "+ UserName+", Logged In.") //Write Data to Device ** Called From: Users Database in Citect Project Editor under "Entry Command" HDevice = DevOpen("UserLog",0) //Open Logging DeviceĭevWriteLn(hDevice,TimeToStr(TimeCurrent(),4)+ " "+ UserInfo(2)+", Logged Out.") //Write Data to DeviceĭevClose(hDevice) //Close Logging DeviceĬurrentUser() //Call CurrentUser Function ** Use: Trap User Name, Date and Time of a user logout.

how to logout in citect

** Called From: Users Database in Citect Project Editor under "Exit Command" Traps User Name, Date and Time of Logout. This is a bit of code that I use in some of my projects for logging user information to disk and screen. From here you can run Cicode to pickup the user who has logged in and write it to disk or what ever.Īn example of what you can do is shown below. In the Citect Project Editor, drop down menu "System" -> "Users" if you extend this form by pressing "F2", there is an "Entry Command" and an "Exit Command". It is actually quite easy to track user logins and logouts in Citect.












How to logout in citect