currently my authentication class puts the set objects into session vars within the destruct. this seems to fall to pieces when i use this system with my login script which contains a header("Location: /"); followed by exit(); would the change of headers and exit(); prevent the class from destructing thus not setting the session vars?
if this is the case would it be bad practice to remove the exit();?
public function __destruct()
{
$_SESSION['uid'] = $this->uid;
$_SESSION['level'] = $this->level;
}