diff --git a/g3w-admin/usersmanage/forms.py b/g3w-admin/usersmanage/forms.py index 6bb827967..5ca9161fd 100644 --- a/g3w-admin/usersmanage/forms.py +++ b/g3w-admin/usersmanage/forms.py @@ -909,7 +909,18 @@ def clean_email(self): class G3WUsernameRecoveryForm(G3WreCaptchaFormMixin, PasswordResetForm): - pass + + def clean_email(self): + """ + Email exists into db + + :return: Cleaned data email + """ + + if not User.objects.filter(email=self.cleaned_data['email']).exists(): + raise ValidationError(_('No user is available with this email.'), code='email_invalid') + + return self.cleaned_data['email']