API16

API16:JSession/isNew

From Joomla! Documentation

Revision as of 02:03, 25 March 2017 by JoomlaWikiBot (talk | contribs) (preparing for archive only)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Check whether this session is currently created



Syntax

isNew()


Returns

boolean True on success.

Defined in

libraries/joomla/session/session.php

Importing

jimport( 'joomla.session.session' );

Source Body

public function isNew()
{
        $counter = $this->get('session.counter');
        if ($counter === 1) {
                return true;
        }
        return false;
}



Examples

Code Examples