diff --git a/passbook/stages/user_logout/stage.py b/passbook/stages/user_logout/stage.py index ef360b3ed..6b64f4563 100644 --- a/passbook/stages/user_logout/stage.py +++ b/passbook/stages/user_logout/stage.py @@ -3,7 +3,6 @@ from django.contrib.auth import logout from django.http import HttpRequest, HttpResponse from structlog import get_logger -from passbook.flows.planner import PLAN_CONTEXT_PENDING_USER from passbook.flows.stage import AuthenticationStage LOGGER = get_logger() @@ -13,10 +12,10 @@ class UserLogoutStageView(AuthenticationStage): """Finalise Authentication flow by logging the user in""" def get(self, request: HttpRequest) -> HttpResponse: - logout(self.request) LOGGER.debug( "Logged out", - user=self.executor.plan.context[PLAN_CONTEXT_PENDING_USER], + user=request.user, flow_slug=self.executor.flow.slug, ) + logout(self.request) return self.executor.stage_ok()