Problem/Motivation

For documentation purposes we'd need to know the first login of users that are imported.

Thanks for the otherwise helpful module!

Comments

Volker23 created an issue. See original summary.

jayelless’s picture

@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.

volker23’s picture

@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.

jayelless’s picture

Status: Active » Closed (won't fix)

@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.