Tracking Users on database

Hello all :slight_smile:

I need help with small project. "loyalty software"

that could somehow integrate the base or at least you would be able to pour user information from the database. To monitor when and where the last connected or how long he was there, When is the last time gave some post , and so some basic information. Please help if someone has little knowledge about it? Thx