mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-08 21:28:40 +00:00
This commit is contained in:
parent
d1a07e7d9f
commit
a02ebcb17e
|
|
@ -120,8 +120,20 @@ final class HttpSession extends SessionAbstract
|
||||||
$this->setCsrfProtection();
|
$this->setCsrfProtection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function sessionStart() : void
|
||||||
|
{
|
||||||
|
if (\session_status() !== \PHP_SESSION_ACTIVE) {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function sessionEnd() : void
|
||||||
|
{
|
||||||
|
session_write_close();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Csrf protection for forms.
|
* Set CSRF protection for forms.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,10 @@ abstract class SessionAbstract
|
||||||
*/
|
*/
|
||||||
abstract public function save() : bool;
|
abstract public function save() : bool;
|
||||||
|
|
||||||
|
abstract function sessionStart() : void;
|
||||||
|
|
||||||
|
abstract function sessionEnd() : void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user