• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

[Solved] Problem with reputation : How can I set it manually to 0 ?

Scheduled Pinned Locked Moved Technical Support
4 Posts 2 Posters 1.1k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • frju365F Offline
    frju365F Offline
    frju365 GNU/Linux
    wrote on last edited by frju365
    #1

    Hello,
    I wanted to know if it's possible to set the reputation of an user to 0 after a bug. Indeed the first user (me) of this forum has -34400 as reputation, whereas there was no other users. That's the same for other users. Another has -2398.

    Thanks in advance for your help,
    frju365

    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #2

    You need to run two queries to reset the reputation.

    MongoDB

    db.objects.update({_key: "user:<uid>"}, {$set: {"reputation": 0}});
    db.objects.update({_key: "users:repuration", value: "<uid>"}, {$set: {"score": 0}});
    

    Redis

    hset user:<uid> reputation 0
    zadd users:reputation 0 <uid>
    

    Replace <uid> with the correct user ID.

    1 Reply Last reply
    1
  • frju365F Offline
    frju365F Offline
    frju365 GNU/Linux
    wrote on last edited by
    #3

    thank you very much ! it works !

    1 Reply Last reply
    0
  • frju365F Offline
    frju365F Offline
    frju365 GNU/Linux
    wrote on last edited by
    #4

    PS for other users : What I did is :
    1° / Go in you admin panel, in Gestion > Users, and write/see the UID of the user(s) you want to set the reputation to 0

    2° / Go in a terminal, and write :

    # mongod
    > use <yourdatabase>
    > db.objects.update({_key: "user:<uid>"}, {$set: {"reputation": 0}});
    > db.objects.update({_key: "users:reputation", value: "<uid>"}, {$set: {"score": 0}});
    

    That's it ! 🙂

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development