Revision ab8f7956

b/snf-astakos-app/astakos/im/forms.py
211 211
        email = self.cleaned_data['email']
212 212
        if not email:
213 213
            raise forms.ValidationError(_("This field is required"))
214
        if reserved_email(email):
215
            raise forms.ValidationError(_("This email is already used"))
216 214
        return email
217 215
    
218 216
    def clean_has_signed_terms(self):
......
261 259
class ShibbolethUserCreationForm(ThirdPartyUserCreationForm):
262 260
    def clean_email(self):
263 261
        email = self.cleaned_data['email']
264
        if not email:
265
            raise forms.ValidationError(_("This field is required"))
266 262
        for user in AstakosUser.objects.filter(email = email):
267 263
            if user.provider == 'shibboleth':
268 264
                raise forms.ValidationError(_("This email is already associated with another shibboleth account."))
265
        super(ShibbolethUserCreationForm, self).clean_email()
269 266
        return email
270 267

  
271 268
class InvitedShibbolethUserCreationForm(ShibbolethUserCreationForm, InvitedThirdPartyUserCreationForm):

Also available in: Unified diff