Logic Machine Forum
Get Current user logged - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Get Current user logged (/showthread.php?tid=2915)



Get Current user logged - Carlos Padilla - 20.10.2020

Hello,

¿How can I get the current user's name that was logged in the LM?

Thanks by yor help.


RE: Get Current user logged - admin - 21.10.2020

In newer firmwares you can access Globals.user variable in custom JavaScript. For event scripts you can check event.meta field, but it's only set when object value is changed via UI/Visualization.


RE: Get Current user logged - buuuudzik - 21.10.2020

(21.10.2020, 07:10)admin Wrote: In newer firmwares you can access Globals.user variable in custom JavaScript. For event scripts you can check event.meta field, but it's only set when object value is changed via UI/Visualization.

I've found that Globals.user is not available from Custom Javascript when Schedulers opened. Is this intentionally?