def dologout(request):
    if not request.user.is_anonymous():
        events.raiseEvent("UserLogout", request)
        logger = logging.getLogger("modoboa.auth")
        logger.info(_("User '%s' logged out" % request.user.username))
        logout(request)
    return HttpResponseRedirect(reverse("core:login"))
Logout the current user.
dataset/ETHPy150Open tonioo/modoboa/modoboa/core/views/auth.py/dologout