SAND-framework/application/class/Session.php
Emmanuel ROY 2e4d5bfbfd Ajout et tests des modules Wordpress et Prestashop
Installation finalisée pour wordpress
Installation en erreur pour Prestashop
2019-12-06 17:35:12 +01:00

38 lines
661 B
PHP

<?php
namespace MVC\Classe;
class Session
{
static public function start()
{
session_start();
return;
}
static public function setUserProfile($userProfile)
{
$_SESSION['userProfile'] = $userProfile;
return;
}
static public function setToken($token)
{
$_SESSION['userToken'] = $token;
return;
}
static public function isRegistered()
{
if (isset($_SESSION['userProfile'])) {
return;
} else {
header("location : " . Url::link_rewrite(false, 'error', []));
die('Ooops, something was wrong...');
}
}
}