JSession/restart
From Joomla! Documentation
< API16:JSessionRevision as of 17:42, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Restart an expired or locked session.
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</...)
Revision as of 17:42, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Restart an expired or locked session.
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</...)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Restart an expired or locked session.
Template:Description:JSession/restart
Syntax[edit]
restart()
Returns[edit]
boolean true on success
Defined in[edit]
libraries/joomla/session/session.php
Importing[edit]
jimport( 'joomla.session.session' );
Source Body[edit]
public 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;
}
[Edit See Also] Template:SeeAlso:JSession/restart
Examples[edit]
<CodeExamplesForm />