from django.contrib.auth import logout\r
from forum.models.user import AnonymousUser\r
from forum.views.auth import forward_suspended_user\r
+import logging\r
\r
class ExtendedUser(AuthenticationMiddleware):\r
def process_request(self, request):\r
return forward_suspended_user(request, user)\r
\r
return None\r
- except:\r
- pass\r
+ except Exception, e:\r
+ import traceback\r
+ logging.error("Unable to convert auth_user %s to forum_user: \n%s" % (\r
+ request.user.id, traceback.format_exc()\r
+ ))\r
\r
request.user = AnonymousUser()\r
return None
\ No newline at end of file