MyBB Community Forums

Full Version: session_destroy() on logout
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I added custom code (global.php) on our forum, once the user logged-in it creates session. The code below:
// Create session for this user
require_once MYBB_ROOT.'inc/class_session.php';

$session = new session;
$session->init();
$mybb->session = &$session;

//code added below//

ini_set('session.save_path',realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/site_sessions'));

session_start();

Now, I dont know where to put the session_destroy() code when the user logged-out. It seems that mybb doesn't use session_start and logout button is just link with logout key (can't find the build-in function of it).
Have you checked all the hooks present in MyBB ?
http://docs.mybb.com/1.8/development/plugins/hooks/