An invited user can skip over the standard account activation flow. This may be causing the discrepancy between the user.is_active field and the registration_profile.activated field.
|
user = User.objects.filter(email__iexact=form.cleaned_data['email'], |
|
registrationprofile__activated=False) |
|
if user.exists(): |
|
form.add_error(None, ValidationError(_('This account is inactive'), |
|
code='inactive')) |
|
return self.form_invalid(form) |