Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Track users logging in
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Track users logging in

 Post Reply Post Reply
Author
frasier View Drop Down
Newbie
Newbie


Joined: 17 June 2003
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote frasier Quote  Post ReplyReply Direct Link To This Post Topic: Track users logging in
    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?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.



Edited by michael
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.