lastLoginDate gets reset to 00:00:00 shortly after successful login

After a successful login, the User_.lastLoginDate is initially stored correctly with a millisecond-precise timestamp.
However, a few minutes later, the field tends to be updated again, and the time portion is replaced with 00:00:00 of the same day.
This causes the “Last login date” shown in the UI to be off by several hours.

Hi bullmann - thanks for joining the forum, and thanks for the question. Can I ask you to let us know what version of Liferay you are using, whether it is CE or DXP? This will help us start to track down whether this is a bug or is working by design. Thanks!

2 Answers

2

Hi turnstok, we are using 7.4.3.129 CE. If this is by design, is there a setting to toggle this behavior?

I wouldn’t expect this to be happening, and specifically not by design or configurable.

I’ve checked on a system that I’m running (different version though) and the last login timestamp stays on the millisecond value.

Could it be that you’re running a cluster? I’ve seen weird data issues happening when multiple machines access the database (that aren’t properly configured for a cluster - and I see misconfigured clusters from time to time). Or any other access - e.g. through any custom plugin or use of the API?