Module Description
A simple module that tracks each time a user logs in and stores a historical record in your database. This data is then exposed to views so you can report on it if required.


* Logs minimal data: user ID, and time logged in
* Ability to exclude users from tracking by role
* Hooks to allow fine grained control over which logins get tracked
* Hooks to allow you to add information to the data stored
* Views integration

Installation
Install, and activate the module as you would any other module. As soon as the module is active, then logins will be recorded in your database.

If you wish to exclude certain roles from being tracked, then you can assign the role the permission Excluded from login tracking and their logins will not be tracked.

Fine grained control over login tracking
If you need finer grained control over which logins are tracked, then you can implement your required login in hook_login_tracker_track_login_alter() to override whether a login is tracked for an individual instance.

Storage of additional data
You can store additional data along with the login tracking by implementing hook_login_tracker_login_data. The default value is an empty array, so you may add to that as required.

Views integration
You can access the data in the login tracker tables either as a base view, or more usefully as a relationship against the user table.

Frequently asked questions
Does the module track all users? By default the module will track logins for all users except user 1.

Other similar modules
Login History: Logs more information that is necessarily required, and doesn't currently have views integration.

Login activity: Logs more information that is necessarily required. Has additional dependencies which aren't necessary for simple statistical tracking. Doesn't currently have views integration.

Project Usage
1036
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module tracks user logins and stores a historical record in the database, with the ability to exclude certain roles, fine-grained control over tracking, storage of additional data, and views integration.
Data Name
login_tracker

OPENAI CHATBOT

OPENAI CHATBOT

16:30:26
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.