Commits

offline committed 6bf0334

login user bugfix

Comments (0)

Files changed (1)

publicauth/backends/__init__.py

         """
         # only actavted users can login if activation required.
         user = auth.authenticate(identity=self.identity, provider=self.provider)
-        if user and settings.PUBLICAUTH_ACTIVATION_REQUIRED and not request.user.is_active:
+        if user and settings.PUBLICAUTH_ACTIVATION_REQUIRED and not user.is_active:
             messages.add_message(request, messages.ERROR, lang.NOT_ACTIVATED)
             raise Redirect(global_settings.LOGIN_REDIRECT_URL)