Actions

API15

JSession/restart

From Joomla! Documentation

< API15:JSession
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

restart an expired or locked session

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

restart()


Returns

boolean $result true on success

Defined in

libraries/joomla/session/session.php

Importing

jimport( 'joomla.session.session' );

Source Body

function restart()
{
        $this->destroy();
        if( $this->_state !==  'destroyed' ) {
                // @TODO :: generated error here
                return false;
        }
 
        // Re-register the session handler after a session has been destroyed, to avoid PHP bug
        $this->_store->register();
 
        $this->_state   =   'restart';
        //regenerate session id
        $id     =       $this->_createId( strlen( $this->getId() ) );
        session_id($id);
        $this->_start();
        $this->_state   =       'active';
 
        $this->_validate();
        $this->_setCounter();
 
        return true;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />