Commit 22bebb60 authored by Chris Lamb's avatar Chris Lamb
Browse files

Require that users have a validated email address before they can login. (re. #18)

parent 1306b404
......@@ -28,3 +28,11 @@ class AuthenticationForm(django_forms.AuthenticationForm):
return self.cleaned_data
def confirm_login_allowed(self, user):
if user.email_validated is None:
raise forms.ValidationError(
"Please check your email for your confirmation email."
......@@ -24,6 +24,9 @@ class TestCase(TestCase):
self.user.email_validated = self.user.date_joined
name="Profile name",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment