Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging when users Log in and out

Status
Not open for further replies.

hengisglasgow73

IS-IT--Management
Feb 13, 2003
20
GB
Has anyone got code to log to a database when users log into CE on Log out of/session expires.

I want to gauge which users are using the system most etc.

OR :

Is there a system DB report that can be pulled off to give similar info?

TIA

Hengis
 
I have found a solution to my question. Thanks for all the input :)
 
I would like to be able to do this, please share what you have found..thanks! =)

LMC

LMC cryerlisa@hotmail.com

select * from Management where proj_mgmt_skills <> NULL

0 records returned
 
Sure

I set up a table with a username(varchar) field and logdate(datetime).

The following code snippet is placed in the logonuser function in the logon.csp file:
==========================
//Log the user as entering the system
var conn = new ActiveXObject(&quot;ADODB.Connection&quot;) ;
var connectionstring = &quot;Provider=MSDASQL.1;Persist Security Info=False;User ID=USERNAME;Data Source=YOURSCHEMANAME&quot;
conn.Open(connectionstring)
var rs = new ActiveXObject(&quot;ADODB.Recordset&quot;)
var mydate = new Date()
var mymonth = mydate.getMonth()+1
rs.Open(&quot;INSERT TBL_JOBCOST_LOG (Username,logdate) values('&quot;+username+&quot;', '&quot; + mydate.getFullYear() +&quot;-&quot; + mymonth + &quot;-&quot; + mydate.getDate() + &quot; &quot; + mydate.getHours() + &quot;:&quot; + mydate.getMinutes() + &quot;')&quot;, conn)
conn.close

======================================

Its probably a bit scrappy with the months and stuff but its my first ad hoc bit of javascript - and it works so I was pretty chuffed.

If it blows your whistle then nominate me helpful....
or is coercion not allowed :)

Cheers
 
I don't think that coercion is disallowed, but it's not the mode.

LMCRYER: Consider leveraging the logging (audit files) built into CE as well, it will log IP and many other tidbits of info.

-k
 
Hm, I cant seem to find anything about audit files...any ideas out there? Please throw some tidbits this way! =)

Thanks so much!

LMC

LMC cryerlisa@hotmail.com

select * from Management where proj_mgmt_skills <> NULL

0 records returned
 
Audit files? I personally use Pedestal Software SecurityExpressions for all of my auditing and compliance activities and I have been very pleased with the results. While I normally gravitate towards free software tools, I don't regret paying for SecurityExpressions. It has saved me year after year on the corporate wide system security audit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top