JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
copyrighted dwt.php, metaform textboxes aren't puny by default, added kill_session()
[wfpl.git] / session.php
index 41670a6..07b759a 100644 (file)
@@ -130,6 +130,15 @@ function init_session() {
        }
 }
 
+# delete the current session
+function kill_session() {
+       if(!session_exists()) {
+               return;
+       }
+       db_delete('wfpl_session_data', 'where session_id=%i', $GLOBALS['session_id']);
+       db_delete('wfpl_sessions', 'where id=%i', $GLOBALS['session_id']);
+}
+
 # save a variable into the session
 function session_set($name, $value) {
        db_delete('wfpl_session_data', 'where session_id=%i && name=%"', $GLOBALS['session_id'], $name);