Open topic with navigation
You must explicitly create a connection with the connect() method to use setUserString() or getUserString().
Use the setUserString() method to pass a user string that is written in the xfServerPlus log. This string is stored, and the value set can be retrieved with getUserString(). You can, for example, use this method to write the current client to the log.
To use this method, xfServerPlus logging must be turned on (see Using server‑side logging) and there must be an entry for the subroutine XFPL_LOG in the SMC. (By default, XFPL_LOG is included in the SMC; see XFPL_LOG for details.)
For example, if your logon routine stored the username in a string called “username,” you could set it in the log like this:
You can then retrieve the string you set. Note that getUserString() only gets the string from setUserString(); it does not retrieve it from the xfServerPlus log.
For example, in C#:
string currUser = ""; currUser = userSess.getUserString();
For example, in VB:
Dim currUser As String currUser = userSess.getUserString()