If I call this with no user logged in, I get the screenshot below, as expected. When I log in, I can see the username, etc, as expected. However, when I log out, the username, password, user groups, etc stay as if I'm still logged in. I would expect to see empty strings in the username, and 0's in the groups, just like the initial screenshot. Do I have to reset it somehow?
Hi
im only have 3 groups \ users - the deafault ones
admin \ servie \ operator
i JUST NEED TO KNOW WHO IS CURRENTLY LOGGED IN
TO Display the user name , thats all
this code above do not work for me please help
im sure its very simple
if you just want to show the currently logged in user in the visualization, then just create a field with text %s and as text variable VisuElems.CurrentUserName
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using the following code to get information on the current logged in user:
If I call this with no user logged in, I get the screenshot below, as expected. When I log in, I can see the username, etc, as expected. However, when I log out, the username, password, user groups, etc stay as if I'm still logged in. I would expect to see empty strings in the username, and 0's in the groups, just like the initial screenshot. Do I have to reset it somehow?
Last edit: tvm 2022-07-15
more posts ...
This doesn't work when you have multiple clients, so you must iterate over the clients and then get the required info per client.
E.g. add this to a program which you call from the VISU_TASK
See for a general other way of using this "Client handling":
https://faq.codesys.com/display/CDSFAQ/WebVisu%3A+Reading+the+IP+Address+of+the+Client
Hi
im only have 3 groups \ users - the deafault ones
admin \ servie \ operator
i JUST NEED TO KNOW WHO IS CURRENTLY LOGGED IN
TO Display the user name , thats all
this code above do not work for me please help
im sure its very simple
if you just want to show the currently logged in user in the visualization, then just create a field with text %s and as text variable VisuElems.CurrentUserName