Script to find out recently activated users in user-manager .

Hi
I’m trying to have a script run daily that would email the list of recently activated.
Here is our process with usermanager.

  1. I need to fire a script daily of the couple of users that got activated last night.
    Those are clearly obvious in user-manager however if in terminal you type
    “/tool user-manager user print” it only shows the admin user connected to winBox!! not the end users in user-manager
    QUESTION: What is the proper command/script to show users in user-manager with all the good info like Profile, start-time etc??
    i tried "/ip hotspot active " but this only shows me the active users now not the view i want. Please see attached.

  2. As for the activated users last night, once i get the “Start from” column in the users table
    then i can compare it to today’s date -1. And then just dump the output in a csv file.

  3. the final step would be to send an email . I found a script for that.

Here is our process:
1)A user wants access to wifi. She pays for the service
2)User is created in the system but not activated.
3)A list of the new users are printed from the system and send to accounting for validation of the balance.
4) Once approved the help desk activates the user.

Anyone please??? :confused:

So finally i gave up on terminal commands. They are limiting. HSo i’m setting up PHP and using it on the ROUTEROS server and using SQLite3 to access the db directly. Cheers

Hi,

I have been trying to extract such information using php api, but with no success. For example, “tool user-manager session print” produces a vast amount of data and I am trying to find a way to use a date filter on this command.

How are you able to access the use-manager database via php api?

Thanks!