After update I've noticed that my on-login script dont work properly.
I make diagnostic and find out that now on-login script dont see global functions a variables(my on-login script call global function).
It worked good few days before, but now dont.
Also i noticed that script/environment doesnt consists user for any environment.
since you not put pHSUserOnLogin on forum,
and you can read the other post you linked,
it's nothing more to add, the solution is already defined in the other topic.
BUT...
Use your brain:
If when you launch a script the couter of "Run Count" increase...
`/system script run scriptForRunCount'
Just count on this way how many times users login... NO?
do you have further information about to handle global vars, created by a user owned script and read them while triggered through ppp/dhcp/hotspot as this seems to be the user sys.
Because i have also some trouble with reading global vars. Strangly some work and some don't.
Some kind of hint would be appreciated, your posts helped me a lot the last years.
pHSUserOnLogin is just global function nothing more. It should save params in {"Mac":{"username"=$user;hostname="..."}}. It's worked 2 months since I did it. But now something is going wrong.
I'm not sure, that update causes this issue. If not the case, then what difference between old behavior and current. It's really strange.
Solution in the topic I found, it's too complicated (I can make it, but it is wrong: onlogin->file->run script which read file). I dont want to make deal with this.
The Question is if this worked well just one week ago, maybe it's better to understand what real difference is and how to run onLogin l(or defining global functions) correctly, as it was running before.
Can you give ideas what might be the cause of running before?
In case of any "worked in version x and now broken in y" and nothing obvious in changelog or release topics, then I would rather contact MikroTik support. They break it, they either need to fix it or provide proper changelog. RouterOS is a commercial project and no open source hobbyist side-project. Focus should be stability and reliability. Not breaking peoples existing scripts without announcement. But sometimes the developers at MikroTik make slight changes which impact a dozen of other areas. But they are not aware, because they don't have tests. And that's why customers need to report these bugs, so MikroTik can fix them. But sometimes these bugs return, because Mikrotik does not add tests to avoid regressions. It is a loop.