Server API - Session Object Methods 1


Home>Product Description>Programmer API>Server API

Session Object Methods - 1 of 2

$Create

Creates an entry in the WebPublisher Studio session table and returns a session code. If the user already has a session, the session is refreshed and a new code is returned.

Syntax

Do SESSION.$Create($clib,cUserID,cCode) Returns #F

cUserID

character - unique user ID for session.

cCode

character variable that receives the session code.

#F

true if the session was created, false if an error occurred.


$Verify

Verifies that a session code exists in the session table and returns the user ID. Generates a new session code if required.

Syntax

Do SESSION.$Verify($clib,bRegen,cCode,cUserID) Returns #F

bRegen

boolean - if true a new session code is generated, if false the same code is returned.

cCode

character - unique user ID for session.

cUserID

character variable that receives the user ID.

#F 

true if the session exists, false if the session has expired or an error occurred.


$GetInfo

Searches the session table by either user ID, current code or previous code.

Syntax

Do SESSION.$GetInfo($clib,cUserID,cCurCode,cPrevCode) Returns #F

cUserID

character variable.

cCurCode

character variable.

cPrevCode

character variable.

#F 

true if the session exists, false if the session has expired or an error occurred.

Notes

  • If cUserID is specified, session table is searched by user ID. If found, the current and previous session codes are returned in iCurCode and iPrevCode.
  • If cUserID is empty and iCurCode is specified, session table is searched by current code. If found, the user ID and previous session code are returned in cUserID and cPrevCode.
  • If cUserID is empty, cCurCode=0 and cPrevCode is specified, session table is searched by previous code. If found, the user ID and current session code are returned in cUserID and cCurCode.
©Corporate Windows Pty Limited 2012 Previous | Next