API16

API16:JSession/isNew

From Joomla! Documentation

Revision as of 22:42, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Check whether this session is currently created <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<no...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Check whether this session is currently created

[Edit Descripton]

Template:Description:JSession/isNew

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;
}

[Edit See Also] Template:SeeAlso:JSession/isNew

Examples

<CodeExamplesForm />