$Session Delete: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
No edit summary
Line 2: Line 2:
<span class="pageSubtitle">Delete a session</span>
<span class="pageSubtitle">Delete a session</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Session_Delete function is <var>[[Global and session objects#Using Object class methods to access global and session objects|DiscardSession]]</var>.</p>
<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. Unfortunately, there is no O-O equivalent of $Session_Delete.</p>


<var>$Session_Delete</var> deletes a [[Sessions|session]].
<var>$Session_Delete</var> deletes a [[Sessions|session]].


==Syntax==
==Syntax==
<p class="syntax"><span class="term">%rc</span> = <span class="literal">$Session_Delete</span>(<span class="term">sesid, [owner], [timeout])
<p class="syntax"><span class="term">%rc</span> = <span class="literal">$Session_Delete</span>(<span class="term">sesid, [owner], [timeout]</span>)
</p>
</p>



Revision as of 00:56, 5 June 2013

Delete a session

Most Sirius $functions have been deprecated in favor of Object Oriented methods. Unfortunately, there is no O-O equivalent of $Session_Delete.

$Session_Delete deletes a session.

Syntax

%rc = $Session_Delete(sesid, [owner], [timeout])

Syntax terms

%rc A numeric variable that is set to 0, indicating success, or to a numeric error indicator:

0 - No errors 1 - Session not found 2 - Session in use

sesid The id of the session to be deleted. This is a required argument.
owner The userid that owns the session to be deleted. An owner of "*" means that the session is public, that is available to all users. This optional argument defaults to the creating user's userid.
timeout The time to wait for an in-use session to be closed to perform a synchronous delete. If timeout is 0 or the session being deleted is the session currently opened by the invoking user or the session is not closed within the indicated timeout time, the session is deleted asynchronously when the session is closed. This argument defaults to 0 which means that if the session is in-use it is deleted asynchronously.

Usage notes

  • A return code of 2 indicates that while the session hasn't been deleted, it will be as soon as it is closed. In fact, this would be the normal return code when deleting the current sesssion — the session actually being deleted when it is closed or the user logs off.

Example

The following example deletes the current session no matter what its id:

%sesid = $Session_Id %rc = $Session_Delete(%SESID) %rc = $Session_Close


Products authorizing $Session_Delete