Closed (won't fix)
Project:
User history
Version:
8.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 May 2021 at 15:03 UTC
Updated:
28 Jul 2022 at 07:00 UTC
Jump to comment: Most recent
Comments
Comment #2
jayelless commented@Volker23 Can you clarify what you mean by "...the first login of users that are imported"? Is this the value of the login date/time of the first login AFTER that module has been installed, or the date/time of the first login of the user into the system? Note that this later value will not be available for users who had logged into the system before the user_history module was installed.
The system user table contains timestamps for the most recent login of a user account, and for the last request access. Both these values change frequently as the system is accessed, so there is limited value in collecting them in the user-history table.
Comment #3
volker23 commented@jlscott We will import users via Bulk User registration (https://www.drupal.org/project/bulk_user_registration). We need to track, when the very first login occurs. This value is not saved anywhere in Drupal, only the last login. So i was hoping that user history would do that. I am talking about logins that occur after the installation of the module.
Comment #4
jayelless commented@Volker23. I think that what you are asking for is best provided by a custom field added to the user entity. You would then need to implement code in a custom module that implements hook_user_login() or reacts to the login event to record the date/time of the login if that field was empty. The user_history module is probably not the correct place for such functionality.