diff --git a/tailbone/views/core.py b/tailbone/views/core.py index 67d270dd..e30d31f2 100644 --- a/tailbone/views/core.py +++ b/tailbone/views/core.py @@ -45,9 +45,12 @@ class View(object): def __init__(self, request): self.request = request - if request.user and not request.user.active: + + # if user becomes inactive while logged in, log them out + if getattr(request, 'user', None) and not request.user.active: headers = logout_user(request) raise self.redirect(request.route_url('home')) + config = self.rattail_config if config: self.enum = config.get_enum()