User Profile - 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: User Profile (/showthread.php?tid=2679) |
User Profile - sjfp - 09.06.2020 Is there a way to determine which user has logged on to the LM. Would like to change the value of an Object to identify which user is logged in, so that various controls can be set to Read-Only depending on which user has logged on. I have a script that enable and disable objects, so just need the bit to find the user ? Thanks for help engineer1 grp.write('1/1/1',1) engineer2 grp.write('1/1/1',2) RE: User Profile - Erwin van der Zwart - 09.06.2020 Hi, Run this script to create the user.lp inside the user ftp folder: Code: -- use this path for request: http://192.168.0.10/user/user.lp Code: $(function(){ Erwin RE: User Profile - sjfp - 09.06.2020 Thank You very much, will give it a try RE: User Profile - Daniel - 09.06.2020 In the new FW we can check current user by Globals.user No need for lp in this case. It will work only in RC2 or the new 2.5.0 for SE Code: $(function() { RE: User Profile - Erwin van der Zwart - 09.06.2020 Yep, noticed it in the beta, cool (: RE: User Profile - sjfp - 09.06.2020 Cool, how can I display the logged in user name on the main Vis page RE: User Profile - Daniel - 09.06.2020 write it to the object RE: User Profile - admin - 09.06.2020 Create a label element, set additional classes to username Add to Custom JS: Code: $(function(){ RE: User Profile - sjfp - 09.06.2020 So easy when you know how. Thanks again for your continued support RE: User Profile - toujour - 13.08.2020 How can I log the actual user in the "objects log" ? I want recording the user that had pressed the button. RE: User Profile - Daniel - 13.08.2020 In latest fw it is done out of the box RE: User Profile - toujour - 13.08.2020 ok....now I saw !! thanks !! |