Exemplo n.º 1
0
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()
Exemplo n.º 2
0
def deactivate_user(user, moderator):
    user.is_active = False
    user.save()
    deactivation = Deactivation(user=user, moderator=moderator)
    deactivation.save()
Exemplo n.º 3
0
def deactivate_user(user, moderator):
    user.is_active = False
    user.save()
    deactivation = Deactivation(user=user, moderator=moderator)
    deactivation.save()