LemonStand Documentation

customer_logout

function customer_logout($redirect = null)

Closes a session of a current customer and redirects browser to a specified address. Use this function to create Logout page.

Parameters

  • $redirect - string, optional. Specifies an URL to redirect user browser to.  If this parameter is omitted or its value is NULL, no redirection will be done.

Examples

The following code closes a customer session and redirects browser to the home page.

customer_logout('/');

Next: flash_message
Previous: global_content_block
Return to Reference