Revision eedb3923

b/snf-astakos-app/astakos/im/forms.py
318 318
        check = captcha.submit(rcf, rrf, RECAPTCHA_PRIVATE_KEY, self.ip)
319 319
        if not check.is_valid:
320 320
            raise forms.ValidationError(_('You have not entered the correct words'))
321
    
322
    def clean(self):
323
        super(LoginForm, self).clean()
324
        if self.user_cache.provider != 'local':
325
            raise forms.ValidationError(_('Local login is not the current authentication method for this account.'))
326
        return self.cleaned_data
321 327

  
322 328
class ProfileForm(forms.ModelForm):
323 329
    """
b/snf-astakos-app/astakos/im/functions.py
258 258
    
259 259
    user.delete()
260 260
    local_user.provider = 'shibboleth'
261
    local_user.set_unusable_password()
262 261
    local_user.third_party_identifier = user.third_party_identifier
263 262
    local_user.save()
264 263
    send_greeting(local_user, greeting_template_name)

Also available in: Unified diff