code: def clean(self):
          
          cleaned_data = super(FederateUserCredential, self).clean()
          try:
              user = models.FederatedUser.get_from_federated_username(cleaned_data["username"])
              user.ticket = ""
              user.save()
          # should not happed as if the FederatedUser do not exists, super should
          # raise before a ValidationError("bad user")
          except models.FederatedUser.DoesNotExist:  # pragma: no cover (should not happend)
              raise forms.ValidationError(
                  _(u"User not found in the temporary database, please try to reconnect")
              )
          return cleaned_data
docs: Validate that the submited :attr:`username` and :attr:`password` are valid using
              the :class:`CASFederateAuth<cas_server.auth.CASFederateAuth>` auth class.
  
              :raises django.forms.ValidationError: if the :attr:`username` and :attr:`password`
                  do not correspond to a :class:`FederatedUser<cas_server.models.FederatedUser>`.
              :return: The cleaned POST data
              :rtype: dict