public function destroy()
    {
        parent::destroy();

     Logger::get()->debug('Destroying user ' . $this->id);
        // If this user is the one stored in the session, destroy that too.
        if (!empty($_SESSION) && ($_SESSION['current_user'] == $this)) {
            unset($_SESSION['current_user']);
        }
    }