public function regenerate($flush = false)
    {
        // regenerate and fetch status
        $status = session_regenerate_id($flush);

        // store fresh created session-id
        $this->setId(session_id());

        // check for lifetime
        if ($flush) {
            // if we flush - we flush cookie too! so set date/time in past
            $lifetime = (time() - $this->getLifetime());
        } else {
            // we use the current defined lifetime
            $lifetime = $this->getLifetime();
        }

        /*
        // reset session cookie
        $status &= $this->setSessionCookie(
            $this->getIdentifier(),
            $this->getId(),
            $lifetime,
            $this->retrievePathToCurrentClass(),
            $this->getDomain(),
            $this->getSsl(),
            $this->getHttpOnly()
        );
        */

        // return status
        return $status;
    }
public function regenerate($flush = false)
    {
        // regenerate and fetch status
        $status = session_regenerate_id($flush);

        // store fresh created session-id
        $this->setId(session_id());

        // check for lifetime
        if ($flush) {
            // if we flush - we flush cookie too! so set date/time in past
            $lifetime = (time() - $this->getLifetime());
        } else {
            // we use the current defined lifetime
            $lifetime = $this->getLifetime();
        }

        /*
        // reset session cookie
        $status &= $this->setSessionCookie(
            $this->getIdentifier(),
            $this->getId(),
            $lifetime,
            $this->retrievePathToCurrentClass(),
            $this->getDomain(),
            $this->getSsl(),
            $this->getHttpOnly()
        );
        */

        // return status
        return $status;
    }
public function regenerate ( $ flush = false ) { // regenerate and fetch status $ status = session_regenerate_id ( $ flush ) ; // store fresh created session-id $ this -> setId ( session_id ( ) ) ; // check for lifetime if ( $ flush ) { // if we flush - we flush cookie too! so set date/time in past $ lifetime = ( time ( ) - $ this -> getLifetime ( ) ) ; } else { // we use the current defined lifetime $ lifetime = $ this -> getLifetime ( ) ; } /*
        // reset session cookie
        $status &= $this->setSessionCookie(
            $this->getIdentifier(),
            $this->getId(),
            $lifetime,
            $this->retrievePathToCurrentClass(),
            $this->getDomain(),
            $this->getSsl(),
            $this->getHttpOnly()
        );
        */ // return status return $ status ; }
Regenerates the whole session.

@param bool $flush TRUE to flush the whole session content, otherwise FALSE to transfer to new session

@author Benjamin Carl <opensource@clickalicious.de>

@return bool TRUE if everything wents fine, otherwise FALSE
Regenerates the whole session .