@crazycells A forum opened in multiple tabs will use the same session.
An incognito tab would be a new, separate, session.
Separate browsers are separate sessions.
Hi guys, me again!
Can someone tell me how reputation system works ? Is it "just" related to upvote/downvote ? Something else ?
Also how can i do to give members XX reputation when joining a group ? I wanted to do it through rewards but there is no "If user's group", is there any way to add it ?
@jeff said in users reputation:
Is it "just" related to upvote/downvote ?
Yes, users earn/lose reputation by up votes/downvotes.
It's not available in rewards plugin. You can create a plugin to give reputation when user joins a group.
Make the plugin listen to hook action:group.join
. Check for the group name and use the uid passed in the hook to give reputation using this...
user.incrementUserFieldBy(uid, 'reputation', xx);
To complete @pichalite 's answer, you have to update the value in the users:reputation
sorted set as well. So you would do
user.incrementUserFieldBy(uid, 'reputation', 1, function (err, newreputation) {
if (err) {
return callback(err);
}
db.sortedSetAdd('users:reputation', newreputation, uid, callback);
});