Jahia DX > jnt:user - lastLoginDate...

1 (1 Good)
0 (0 Bad)

jnt:user - lastLoginDate property

by  kamran »  2011/11/14 14:39

Hi,

I tried to create a list of users ordered by the "lastLoginDate" property using the JCR query :

select * from [jnt:user] as user order by user.[lastLoginDate] desc

But it seems that the lastLoginDate is not updated each time a user log-in the website :-/

Do you know why ? Is there some thing special to do for activating this ?

I found that the following code has been commented on the org.jahia.params.valves.LoginEngineAuthValveImpl.invoke() :

            // The following was deactivated for performance reasons. We should instead look at doing this with Camel
            // or some other asynchronous way.
            //theUser.setProperty(Constants.JCR_LASTLOGINDATE,
            //        String.valueOf(System.currentTimeMillis()));

thanks,

Kamran

  (kamran)

Number of messages  31
Registration date
0 (0 Good)
1 (1 Bad)

Re: jnt:user - lastLoginDate property

by  shuber »  2011/11/14 14:50

This property was deactivated because it was creating performance issues under large loads. If you need it you might want to provide an alternative LoginEngineAuthValveImpl that reactivates the code but be aware that updating a property each time a user logs in will have a performance impact.

Regards,

  Serge Huber.

Serge Huber (shuber)

Number of messages  271
Registration date
1 (1 Good)
0 (0 Bad)

Re: Re: jnt:user - lastLoginDate property

by  kamran »  2011/11/14 15:20

Dear Serge,

thanks for your very quick answer.

But this is a functionality available in all kind of CMS :-/

The only user that can be problematic is the "guest" one... for others, they do not log-in/log-out a lot each day !

I agree that I can re-write LoginEngineAuthValveImpl but I don't like rewriting jahia core-code because it will make it more and more difficult to migrate from one release to another.

I think it will be more efficient to add the possibility in Jahia admin to activate/deactivate this functionality, no ?

thanks

kamran

  (kamran)

Number of messages  31
Registration date
0 (0 Good)
0 (0 Bad)

Re: Re: Re: jnt:user - lastLoginDate property

by  shuber »  2011/11/14 15:24

I agree that this can be useful, 

I suggest you enter a ticket in our issue tracker about this.

Regards,

  Serge Huber.

Serge Huber (shuber)

Number of messages  271
Registration date
0 (0 Good)
0 (0 Bad)

Re: Re: Re: Re: jnt:user - lastLoginDate property

by  kamran »  2011/11/14 15:59

done :-)

http://jira.jahia.org/browse/JAHIA-5365

  (kamran)

Number of messages  31
Registration date
Contact
Share
Feedback

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page