#1 2016-09-04 04:12:58

erick
Member
Registered: 2015-09-09
Posts: 155

getting userid string when executing a server interface

Hi,

I'm doing some RPCs, but need to know the userid the code is running as, so I can update the database to who made which changes.

I don't see where I can discover the userid or UID number.  Any help would be appreciated.

Offline

#2 2016-09-04 14:28:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: getting userid string when executing a server interface

You can just define a TSessionUserID published field, which will be filled with the current UserID of the active session, in the TSQLRecord.
See http://synopse.info/files/html/api-1.18 … SIONUSERID

Or you may just use the global ServiceContext variable, from a service, to retrieve the active UserID.
See http://synopse.info/files/html/api-1.18 … ICECONTEXT

Offline

Board footer

Powered by FluxBB