API15

API15:JSessionStorageDatabase/destroy

From Joomla! Documentation

Revision as of 22:14, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Destroy the data for a particular session identifier in the SessionHandler backend. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>[[Description...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Destroy the data for a particular session identifier in the SessionHandler backend.

[Edit Descripton]

Template:Description:JSessionStorageDatabase/destroy

Syntax

destroy($id)
Parameter Name Default Value Description
$id $id The session identifier.

Returns

boolean True on success, false otherwise.

Defined in

libraries/joomla/session/storage/database.php

Importing

jimport( 'joomla.session.storage.database' );

Source Body

function destroy($id)
{
        $db =& JFactory::getDBO();
        if(!$db->connected()) {
                return false;
        }

        $session = & JTable::getInstance('session');
        $session->delete($id);
        return true;
}

[Edit See Also] Template:SeeAlso:JSessionStorageDatabase/destroy

Examples

<CodeExamplesForm />