Foros de discusión

lastFailedLoginDate - need to modify reset behavior

Patricia Powell, modificado hace 11 años.

lastFailedLoginDate - need to modify reset behavior

New Member Mensaje: 1 Fecha de incorporación: 4/02/13 Mensajes recientes
I am using LIferay 6.1 and am creating a portlet that displays the current user's last successful and unsuccessful login. The database table user_ has a lastFailedLoginDate field, but this field gets reset each time a successful login is made so the portlet always shows "null" or blank for the last unsuccessful login (because you have to successfully login to see the portlet!). Where/How do I modify the code responsible for resetting this field (lastFailedLoginDate) so that I can maintain the actual last failed login date instead of resetting it?
thumbnail
David H Nebinger, modificado hace 11 años.

RE: lastFailedLoginDate - need to modify reset behavior

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
I would suggest not trying to modify the liferay code that is resetting the value (as this will have cascading effects through Liferay that you may not understand).

Instead I would leverage the expando table to store this info. You can use a model listener on the User model object to intercept the values that Liferay intends on setting/clearing, and use that info to populate the expando values.
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: lastFailedLoginDate - need to modify reset behavior

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
because you have to successfully login to see the portlet!


If you give view permission to guest, users who have not logged in will be able to see the portlet.
I think you can get the value before the user actually logs in. It really doesn't seem to make too much sense
to keep seeing old unsuccessful login date.