Posts: 99
Threads: 39
Joined: Apr 2018
Reputation:
0
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)
Posts: 99
Threads: 39
Joined: Apr 2018
Reputation:
0
Thank You very much, will give it a try
Posts: 4643
Threads: 24
Joined: Aug 2017
Reputation:
207
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() {
var currentuser = Globals.user
if(currentuser === 'admin'){
// do action for admin
}else if(currentuser === 'erwin'){
// do action for erwin
}
});
------------------------------
Ctrl+F5
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
Yep, noticed it in the beta, cool (:
Posts: 99
Threads: 39
Joined: Apr 2018
Reputation:
0
Cool, how can I display the logged in user name on the main Vis page
Posts: 4643
Threads: 24
Joined: Aug 2017
Reputation:
207
write it to the object
------------------------------
Ctrl+F5
Posts: 99
Threads: 39
Joined: Apr 2018
Reputation:
0
So easy when you know how.
Thanks again for your continued support
Posts: 106
Threads: 40
Joined: Sep 2017
Reputation:
0
How can I log the actual user in the "objects log" ?
I want recording the user that had pressed the button.
KNX Advanced Partner + Tutor
Posts: 4643
Threads: 24
Joined: Aug 2017
Reputation:
207
In latest fw it is done out of the box
------------------------------
Ctrl+F5
Posts: 106
Threads: 40
Joined: Sep 2017
Reputation:
0
ok....now I saw !!
thanks !!
KNX Advanced Partner + Tutor