DRS Clients Login/Logout

Find and share HowTos to various installations / configurations!
2 posts • Page 1 of 1
NikolayLevchenko
Posts:74
Joined: Wed May 10, 2017 3:34 pm

DRS Clients Login/Logout

Post by NikolayLevchenko »

Hi,

We have a DRS system and we use ETM-provided option of running 2 clients on the same PC (one for PSS and one for SSS) using "disRecSystem_VisuControl.pnl".

We also use config setting "autoLoginOnSameHost = 1" so that backgroud client logs our and in automatically while operator is using the foreground client. So far all good.

There is one thing we are having trouble with though.

Our normal "log out" actually doesn't just log out to "no user", we had to create a special "guest" user and log out into this user. This is because the client requires guest to be able to navigate panels.

So we have a code like that:

Code: Select all

// First use standard logout to make sure the current user is definitely logged out
STD_LogoutCurrentUser();

//Log into "guest"
setUserId(getUserId("SpecialGuestUser"), "PASSWORD");
dpSet(myUiDpName() + ".UserName:_original.._value", "SpecialGuestUser");
As a result of this, foreground client goes to "no user" and almost immediately into "SpecialGuestUser", which is what I need.

But the background client only goes to "no user" (I believe this is done inside of "STD_LogoutCurrentUser" using "disRecSystem_client_Command("LOGOUT")") and then it DOES NOT go into "SpecialGuestUser". How do I make this work properly?

I'm looking into writing values into "_2x2Redu.client.* DPE's but this seems like I'm hacking the system and not using it properly.
Any advice?

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: DRS Clients Login/Logout

Post by Gertjan van Schijndel »

I guess the easiest solution is to connect to the user name of the UI and on logout (empty string) automatically login as 'SpecialGuestUser' (if certain conditions are met, like set by the DRS script or the guest user is logged in at the other system).

2 posts • Page 1 of 1