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']);
        }
    }
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']);
        }
    }
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' ] ) ; } }
Flag the user as no longer in existence, so that it does not
automatically get saved in the session.
Flag the user as no longer in existence so that it does not automatically get saved in the session .