View Single Post
  #1  
Old 29th December 2009, 11:42
benjaminbih benjaminbih is offline
Senior Member
 
Join Date: Jul 2008
Bosnia-Herzegovina
Posts: 70
Default [FIX] Staff & Settings panel cookie expiration and deletion
The admin [staffpanel] and administrator [settingspanel] cookies do not expire and after logout they are not deleted.

Perhaps someone has another opinion, but i think the must bo corrected.

in /admin/index.php cahnge:
PHP Code:
    setcookie('staffpanel','allowed'); 
to
PHP Code:
    $expires time() + 1800;
    
setcookie('staffpanel','allowed'$expires'/admin/'); 
in /administator/index.php cahnge:
PHP Code:
    setcookie('settingspanel','allowed'); 
to
PHP Code:
    $expires time() + 1800;
    
setcookie('settingspanel','allowed'$expires'/administrator/'); 
in /include/functions.php change:
PHP Code:
function logoutcookie()
{
    
setcookie("c_secure_uid"""0x7fffffff"/");
    
setcookie("c_secure_pass"""0x7fffffff"/");
    
setcookie("c_secure_login"""0x7fffffff"/");

to
PHP Code:
function logoutcookie()
{
    
setcookie("c_secure_uid"""0x7fffffff"/");
    
setcookie("c_secure_pass"""0x7fffffff"/");
    
setcookie("c_secure_login"""0x7fffffff"/");
    
setcookie("staffpanel"""0x7fffffff"/admin/");
    unset(
$_COOKIE['staffpanel']);
    
setcookie("settingspanel"""0x7fffffff"/administrator/");
    unset(
$_COOKIE['settingspanel']);


Last edited by benjaminbih; 2nd January 2010 at 21:52.
Reply With Quote
The Following 2 Users Say Thank You to benjaminbih For This Useful Post:
Edgein (29th December 2009), yoligim (3rd January 2010)