How to script delele user expire in usermanager in version 6.38
I cann't find total-time-left in script delete
/tool user-manager user remove [find where !actual-profile ];
#Remove expired users
{
:foreach ExpireUser in=[/tool user-manager user find where !actual-profile] do={
/tool user-manager user remove $ExpireUser;
}
}
*******************use this with profile scriptsCode: Select all#Remove expired users { :foreach ExpireUser in=[/tool user-manager user find where !actual-profile] do={ /tool user-manager user remove $ExpireUser; } }
you welcome*******************use this with profile scriptsCode: Select all#Remove expired users { :foreach ExpireUser in=[/tool user-manager user find where !actual-profile] do={ /tool user-manager user remove $ExpireUser; } }
Hi Adahi, first of all, I appreciate your time.
I tested the scipt, and it worked fine but only with the first user:
I did this:
In the user manager:
+ delete all used users, create 2 new ones.
+ first test voucher consumed its time (2 minutes), after a few minutes the voucher self-eliminated.
But with the following used vouchers the script did not go any further.
Questions and doubts :
1) why does the script have to go in the "user profile> script" section, and not for example in ip> scheduler? (doubt)
2) why does the same script have to go in the "log in" and in "log out"?
doing this, the sript would run when a new user logs in?
3) in the notebook, does not automatically redirect me to the login when connecting to the hotspot signal (I still have the original login of the mikrotik), how could this be solved? (on cell phones / tablets (works automatically).
Thank you very much.
yes user managerAdahi, the issue of user expired, either time or mb quota, I have to configure it in the "profile" of the USER MANAGER, is this correct? or do I have to do it in ip> hotspot?
thanks again.
Now the only thing I have left to solve, are the users who open a voucher but leave before their time / quote, could you help me with that case? thank you very much.
nice. it works. thanks.use this with profile scriptsCode: Select all#Remove expired users { :foreach ExpireUser in=[/tool user-manager user find where !actual-profile] do={ /tool user-manager user remove $ExpireUser; } }