Documentation Center

logout

Logs the user out of the system.

Description

Ends a user's session and logs the user out of the system.

Parameters

action
logout
redirect
If set to "1", will redirect the caller to the original web URL address.
destination
If provided, the user will be redirected to this URL after a logout attempt, regardless of whether the logout is successful or not

Example URL

http://<host>:<port>/<context>/web/session.xql?action=logout&redirect=<value>&destination=<value>

Successful Result

This function returns a standard API result element (<result status='SUCCESS' statusCode='0' message='Localized Message' messageKey='message.key'/>). A statusCode of 0 indicates a successful execution. Any other statusCode indicates a failure. The user name is returned as a sub-element: <info name="user" value="guest"/>

Failed Result

In the case of an error, this function returns a standard API result element with a non-zero statusCode (such as, <result status='FAIL' statusCode='200' message='Localized Failure Message' messageKey='message.key'/>). Refer to API Error Code Reference.