API16

JSession/isNew

From Joomla! Documentation

< API16:JSession

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]

Check whether this session is currently created



Syntax[edit]

isNew()


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 isNew()
{
        $counter = $this->get('session.counter');
        if ($counter === 1) {
                return true;
        }
        return false;
}



Examples[edit]

Code Examples[edit]