'Form processor'

def save(self, *args, **kwargs):

    if self.instance.id:
        self.instance.user.username = self.instance.name
        self.instance.user.save()
        super(UserForm, self).save(*args, **kwargs)
    else:
        new_user = django_auth.User(username=self.cleaned_data['name'], password='')
        new_user.set_password(self.cleaned_data['password'])
        models.signals.post_save.disconnect(user_autocreate_handler, sender=django_auth.User)
        new_user.save()
        if getattr(settings, 'HARDTREE_SIGNALS_AUTOCREATE_USER', False):
            models.signals.post_save.connect(user_autocreate_handler, sender=django_auth.User)
        self.instance.user = new_user
        super(UserForm, self).save(*args, **kwargs)
    if self.cleaned_data['perspective']:
        self.instance.set_perspective(self.cleaned_data['perspective'])
    return self.instance
