diff --git a/bl-kernel/helpers/cookie.class.php b/bl-kernel/helpers/cookie.class.php index 45b7ef42..00b139e8 100644 --- a/bl-kernel/helpers/cookie.class.php +++ b/bl-kernel/helpers/cookie.class.php @@ -20,10 +20,15 @@ class Cookie { $expire = time()+60*60*24*$daysToExpire; setcookie($key, $value, $expire); } + + public static function remove($key) + { + unset($_COOKIE[$key]); + setcookie($key, null, time()-3600); + } public static function isEmpty($key) { return empty($_COOKIE[$key]); } - } \ No newline at end of file diff --git a/bl-kernel/helpers/session.class.php b/bl-kernel/helpers/session.class.php index 1a0271d3..993c340e 100644 --- a/bl-kernel/helpers/session.class.php +++ b/bl-kernel/helpers/session.class.php @@ -73,4 +73,11 @@ class Session { } return false; } + + public static function remove($key) + { + $key = 's_'.$key; + + unset($_SESSION[$key]); + } }