- db_update('sessions', 'expires', $expires, 'id = %i', $GLOBALS['session_id']);
+ db_update('wfpl_sessions', 'expires', $expires, 'where id=%i', $GLOBALS['session_id']);
+}
+
+# delete the current session
+function kill_session() {
+ if(!session_exists()) {
+ return;
+ }
+ _kill_session($GLOBALS['session_id']);
+}
+
+# for internal use. use kill_session() above
+function _kill_session($id) {
+ db_delete('wfpl_session_data', 'where session_id=%i', $id);
+ db_delete('wfpl_sessions', 'where id=%i', $id);