Menu

#1 logout, session destroy not done correctly

open
nobody
None
5
2009-04-21
2009-04-21
Anonymous
No

logout ist not possible, since the function logout ist not called in logout.php

the logout.php should be changed to:

---php---
require_once("includes/config.php");
sessCtrl();
logout();
---php---

furthermore the function logout in ./include/sessionCtrl.php should be changed to the following to properply destroy the session>

---php---
function logout(){
$_SESSION=NULL;
setcookie(session_name(),'',time()-3600);
@session_destroy();
header("Location: index.php");
exit;
}
---php----

Discussion


Log in to post a comment.

MongoDB Logo MongoDB