diff options
author | jeroenpraat <jeroenpraat@xs4all.nl> | 2016-03-14 15:46:57 +0100 |
---|---|---|
committer | jeroenpraat <jeroenpraat@xs4all.nl> | 2016-03-14 15:46:57 +0100 |
commit | b8e8517725df6924c333e0c2c7c21a2696de4f25 (patch) | |
tree | 16851e62950a75f043756f8d59183937831bc104 /include/session.php | |
parent | def04549529d34c6fbe9c7a2396dad7909859953 (diff) | |
parent | 2f5862713e2fb959134c2de23ca4ef9907912030 (diff) | |
download | volse-hubzilla-b8e8517725df6924c333e0c2c7c21a2696de4f25.tar.gz volse-hubzilla-b8e8517725df6924c333e0c2c7c21a2696de4f25.tar.bz2 volse-hubzilla-b8e8517725df6924c333e0c2c7c21a2696de4f25.zip |
Merge branch 'master' of https://github.com/redmatrix/hubzilla
Diffstat (limited to 'include/session.php')
-rw-r--r-- | include/session.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/session.php b/include/session.php index 43bba528b..6060e4712 100644 --- a/include/session.php +++ b/include/session.php @@ -12,6 +12,38 @@ $session_exists = 0; $session_expire = 180000; + +/** + * @brief Resets the current session. + * + * @return void + */ + +function nuke_session() { + new_cookie(0); // 0 means delete on browser exit + + unset($_SESSION['authenticated']); + unset($_SESSION['account_id']); + unset($_SESSION['uid']); + unset($_SESSION['visitor_id']); + unset($_SESSION['administrator']); + unset($_SESSION['cid']); + unset($_SESSION['theme']); + unset($_SESSION['mobile_theme']); + unset($_SESSION['show_mobile']); + unset($_SESSION['page_flags']); + unset($_SESSION['delegate']); + unset($_SESSION['delegate_channel']); + unset($_SESSION['my_url']); + unset($_SESSION['my_address']); + unset($_SESSION['addr']); + unset($_SESSION['return_url']); + unset($_SESSION['remote_service_class']); + unset($_SESSION['remote_hub']); +} + + + function new_cookie($time) { $old_sid = session_id(); |