Notifications since last login

0
Question: I'm having trouble displaying new notifications after a user logs in. In my Mendix app, when a user logs in, the 'lastlogin' attribute of the user entity gets updated automatically. However, when I display only new notifications received since the user's last login, the issue arises because the app considers the current login as the most recent one, resulting in no new notifications being shown. I'd appreciate some guidance on how to retrieve the second-most recent login date and time. I suspect that Mendix doesn't store this information, and it gets overridden each time the user logs in.  
asked
1 answers
0

Hello Matthew,

 

Unfortunately, you cannot change this behavior because it is in the system module of mendix.

However, you can create your own entity with your own logic that keeps track of the lasttime the user saw the notifications or signed out/in. It is a bit more work and logic but it will work.

 

Hope this helps,

 

Good luck!

answered