Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow creation of inactive users through socialregistration - useful …

…if you're limiting user numbers during a beta trial
  • Loading branch information...
commit ae8d743d17336bd486e6302bb456c2f611c2d5c5 1 parent a478dd1
@lizrice lizrice authored
Showing with 6 additions and 2 deletions.
  1. +1 −0  AUTHORS
  2. +5 −2 socialregistration/mixins.py
View
1  AUTHORS
@@ -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>
View
7 socialregistration/mixins.py
@@ -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):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.