From d569fc874bdb10e6a2252f01c0f7477503a1c295 Mon Sep 17 00:00:00 2001 From: pzinovkin Date: Mon, 16 Feb 2009 08:23:43 +0000 Subject: [PATCH] unset for session vars git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@63 4cb57b5f-5bbd-dd11-951b-001d605cbbc5 --- classes/Env.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/classes/Env.class.php b/classes/Env.class.php index c196bb2..b3104ab 100644 --- a/classes/Env.class.php +++ b/classes/Env.class.php @@ -38,6 +38,18 @@ final class Env { $_SESSION[$var] = $value; } + + /** + * Unsets session var + * + * @param string $var + */ + static function unsetSession($var) + { + if (isset($_SESSION[$var])) { + unset($_SESSION[$var]); + } + } static function getCookie($var, $default = false) {