API15:JSessionStorageDatabase/destroy
From Joomla! Documentation
Description
Destroy the data for a particular session identifier in the SessionHandler backend.
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 />