I am building a site for a client that is effectively a job board with a messaging system. They want to know who the last person in their office was to view a specific application and to know who/when someone views specific pages/messages.
I am hoping for something like
set x = users.lastvisitor if currentuser != users.last vistor insert currentuser & date into users.lastvisitor
Can anyone point me in a direction? I am new to Craft so don't know how it handles things like this. I am using matrix blocks for the messages, is it possible to add an entry through a query instead of a form?