[Solved] Problem with reputation : How can I set it manually to 0 ?
-
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 -
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. -
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 02° / 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 !
Copyright © 2024 NodeBB | Contributors