Print Page | Close Window

Track users logging in

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=5911
Printed Date: 03 April 2026 at 6:43am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Track users logging in
Posted By: frasier
Subject: Track users logging in
Date Posted: 23 September 2003 at 10:00am
Is there any way to track how many times per week or per month a user has logged in? I don't care how long they were logged in, I just want to know if they visited the site and when over a period of time. My site is on an intranet and everyone is set to auto login when they go to the forum. So they are logging in automatically. I would like to be able to view who/when they were there. Is this statistic possible?



Replies:
Posted By: WebWiz-Bruce
Date Posted: 23 September 2003 at 11:55am
You would have to check your servers log file, or write a mod that would do this.

The last login time of a user is stored in the database and you can see this info by clicking the users profile.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: michael
Date Posted: 23 September 2003 at 1:48pm

If you run the SQL Server Version you could just create a little trigger like:


CREATE  Trigger wwfUSERLOGINLOG
ON tblAUTHOR
FOR UPDATE
AS
IF (COLUMNS_UPDATED() & 26) > 0         --26th Column should be the last_visit column
      BEGIN
 Declare @username nvarchar(20)
 Select @username = i.username from inserted i
 INSERT INTO tblUSERLOG (Author, logintime)
 VALUES (@username ,getdate())
      END

using a table like:

CREATE TABLE [tblUSERLOG] (
 [id] [int] IDENTITY (1, 1) NOT NULL ,
 [author] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
 [logintime] [datetime] NULL ,
 CONSTRAINT [PK_tblUSERLOG] PRIMARY KEY  CLUSTERED
 (
  [id]
 )  ON [PRIMARY]
) ON [PRIMARY]
GO

no asp required.



-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net