Permalink
Browse files

Allow creation of inactive users through socialregistration - useful …

…if you're limiting user numbers during a beta trial
  • Loading branch information...
1 parent a478dd1 commit ae8d743d17336bd486e6302bb456c2f611c2d5c5 @lizrice lizrice committed May 20, 2012
Showing with 6 additions and 2 deletions.
  1. +1 −0 AUTHORS
  2. +5 −2 socialregistration/mixins.py
View
@@ -19,3 +19,4 @@ Thejaswi Puthraya <thejaswi.puthraya@gmail.com>
Tobias Hasselrot <tobias.hasselrot@gmail.com>
Tom Drummond <tom@devioustree.co.uk>
Zellyn Hunter <Zellyn.Hunter@cmgdigital.com>
+Liz Rice <liz@lizrice.com>
@@ -57,8 +57,11 @@ def inactive_response(self):
"""
Return an inactive message.
"""
- return self.render_to_response({
- 'error': _("This user account is marked as inactive.")})
+ inactive_url = getattr(settings, 'LOGIN_INACTIVE_REDIRECT_URL', '')
+ if inactive_url:
+ return HttpResponseRedirect(inactive_url)
+ else:
+ return self.render_to_response({'error': _("This user account is marked as inactive.")})
def redirect(self, request):
"""

0 comments on commit ae8d743

Please sign in to comment.