Hello
I developed control panel using php and mikrotik api some times i need to reset download for active users this operation not include in previous version and I need It necessary in pppoe and hotspot
I used 5 server mikrotik 4.16 and one radius server
You can extend what was posted to just active users by looping through all active users and resetting them one by one:
:foreach USER=[/ip hotspot active find] do={
:local NAME [/ip hotspot active get $USER user;
/ip hotspot user reset-counters [/ip hotspot user find name="$NAME";
}