This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/_sakura/components/Session.php

25 lines
393 B
PHP
Raw Normal View History

<?php
/*
* User session container
*/
namespace Sakura;
class Session
{
// Current user data
public $userId;
public $sessionId;
// Initialise new session
public function ___construct()
{
// Check if a PHP session was already started and if not start one
if (session_status() != PHP_SESSION_ACTIVE) {
session_start();
}
}
}