Skip to content

Node.js based forum software built for the modern web

fix: uid check

Barış Soner Uşaklıefd7d953de66
diff --git a/src/groups/ownership.js b/src/groups/ownership.js
index 45eb7c3383..527a1b7d0e 100644
--- a/src/groups/ownership.js
+++ b/src/groups/ownership.js
@@ -8,7 +8,7 @@ module.exports = function (Groups) {
Groups.ownership = {};
Groups.ownership.isOwner = function (uid, groupName, callback) {
- if (uid <= 0) {
+ if (!(parseInt(uid, 10) > 0)) {
return setImmediate(callback, null, false);
}
db.isSetMember('group:' + groupName + ':owners', uid, callback);