dddp/accounts/ddp.py
def do_logout(self):
        """Logout a user."""
        # silent unsubscription (sans sub/nosub msg) from LoggedInUser pub
        API.do_unsub(this.user_sub_id, silent=True)
        del this.user_sub_id
        self.update_subs(None)
        user_logged_out.send(
            sender=self.user_model, request=this.request, user=this.user,
        )
        this.user_id = None
        this.user_ddp_id = None
def do_logout(self):
        """Logout a user."""
        # silent unsubscription (sans sub/nosub msg) from LoggedInUser pub
        API.do_unsub(this.user_sub_id, silent=True)
        del this.user_sub_id
        self.update_subs(None)
        user_logged_out.send(
            sender=self.user_model, request=this.request, user=this.user,
        )
        this.user_id = None
        this.user_ddp_id = None
Logout a user.