'Validate that the e-mail address is unique.'

def clean_email(self):

    if get_user_model().objects.filter(email__iexact=self.cleaned_data[u'email']):
        if (userena_settings.USERENA_ACTIVATION_REQUIRED and UserenaSignup.objects.filter(user__email__iexact=self.cleaned_data[u'email']).exclude(activation_key=userena_settings.USERENA_ACTIVATED)):
            raise forms.ValidationError(_(u'This    email    is    already    in    use    but    not    confirmed.    Please    check    your    email    for    verification    steps.'))
        raise forms.ValidationError(_(u'This    email    is    already    in    use.    Please    supply    a    different    email.'))
    return self.cleaned_data[u'email']
