def deactivate_user(user, moderator): user.is_active = False user.save() # Clear user settings to remove incoming notifications Setting.objects.filter(user=user).delete() deactivation = Deactivation(user=user, moderator=moderator) deactivation.save()
def deactivate_user(user, moderator): user.is_active = False user.save() deactivation = Deactivation(user=user, moderator=moderator) deactivation.save()