Posts: 109
	Threads: 41
	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: 109
	Threads: 41
	Joined: Apr 2018
	
Reputation: 
0
	 
	
	
		Thank You very much, will give it a try
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 5284
	Threads: 29
	Joined: Aug 2017
	
Reputation: 
237
	 
	
	
		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: 1807
	Threads: 7
	Joined: Jul 2015
	
Reputation: 
121
	 
	
	
		Yep, noticed it in the beta, cool (:
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 109
	Threads: 41
	Joined: Apr 2018
	
Reputation: 
0
	 
	
	
		Cool, how can I display the logged in user name on the main Vis page
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 5284
	Threads: 29
	Joined: Aug 2017
	
Reputation: 
237
	 
	
	
		write it to the object
	
	
	
------------------------------
Ctrl+F5
	
		
	
 
 
	
	
	
		
	Posts: 109
	Threads: 41
	Joined: Apr 2018
	
Reputation: 
0
	 
	
	
		So easy when you know how.
Thanks again for your continued support
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 116
	Threads: 44
	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: 5284
	Threads: 29
	Joined: Aug 2017
	
Reputation: 
237
	 
	
	
		In latest fw it is done out of the box
	
	
	
------------------------------
Ctrl+F5
	
		
	
 
 
	
	
	
		
	Posts: 116
	Threads: 44
	Joined: Sep 2017
	
Reputation: 
0
	 
	
	
		ok....now I saw !!
thanks !!
	
	
	
KNX Advanced Partner + Tutor