def remove_user(user):
 user_pre_delete.send(instance=user, sender=user.__class__)
 user.username = u'deleted-{0}'.format(user.pk)
 while User.objects.filter(username=user.username).exists():
  user.username = u'deleted-{0}-{1}'.format(user.pk, binascii.b2a_hex(os.urandom(5)))
 user.first_name = u'Deleted User'
 user.last_name = u''
 user.email = u'noreply@weblate.org'
 user.is_active = False
 user.set_unusable_password()
 user.save()
 user.social_auth.all().delete()

def remove_user ( user ) : user_pre_delete . send ( instance = user , sender = user . __class__ ) user . username = u'deleted-{0}' . format ( user . pk ) while User . objects . filter ( username = user . username ) . exists ( ) : user . username = u'deleted-{0}-{1}' . format ( user . pk , binascii . b2a_hex ( os . urandom ( 5 ) ) ) user . first_name = u'Deleted User' user . last_name = u'' user . email = u'noreply@weblate.org' user . is_active = False user . set_unusable_password ( ) user . save ( ) user . social_auth . all ( ) . delete ( )
remove user from conference .