I'm trying to create a function that disables user management by logging in the user to a user group with full control. Since I am using my own library elements, it has been challenging to work with the VisuUserManagement STL Functions and Im getting slowly frustrated :D .
The logout, login and the others work fine. However the logging in to specific User Groups has been failing. Can someone tell me what is wrong here ? Can someone explain to me the arr[] Data, What should I put there ??? ( I have oriented myself on previous answers and the project KeySwitch_VisuClient_Change_v1.project)
I have 4 User Groups defined in user management:
ID Usergroup
1 -> Administrator
2 -> Maintenance
3 -> Operator
5 -> Supervisor -> (Username: Service)
.. -> None
When I call this function, it logs out to UsergroupID 0 and doesn't login to the supervisor user group. The only part I don't understand is the arr[] Array. Im not sure what I need to put there. Can someone advise ?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So I have found the problem. I was calling the UserMgmtEventHandler and for some reason it was logging out as soon as I called the function. I removed the implementation of the HandleLogout function and now seems to be stable.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Codesys community,
I'm trying to create a function that disables user management by logging in the user to a user group with full control. Since I am using my own library elements, it has been challenging to work with the VisuUserManagement STL Functions and Im getting slowly frustrated :D .
The logout, login and the others work fine. However the logging in to specific User Groups has been failing. Can someone tell me what is wrong here ? Can someone explain to me the arr[] Data, What should I put there ??? ( I have oriented myself on previous answers and the project KeySwitch_VisuClient_Change_v1.project)
I have 4 User Groups defined in user management:
ID Usergroup
1 -> Administrator
2 -> Maintenance
3 -> Operator
5 -> Supervisor -> (Username: Service)
.. -> None
When I call this function, it logs out to UsergroupID 0 and doesn't login to the supervisor user group. The only part I don't understand is the arr[] Array. Im not sure what I need to put there. Can someone advise ?
Thanks
So I have found the problem. I was calling the UserMgmtEventHandler and for some reason it was logging out as soon as I called the function. I removed the implementation of the HandleLogout function and now seems to be stable.