mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
guests can no longer attempt to join a group, #2588
This commit is contained in:
@@ -599,11 +599,15 @@ var async = require('async'),
|
||||
};
|
||||
|
||||
Groups.requestMembership = function(groupName, uid, callback) {
|
||||
db.setAdd('group:' + groupName + ':pending', uid, callback);
|
||||
plugins.fireHook('action:groups.requestMembership', {
|
||||
groupName: groupName,
|
||||
uid: uid
|
||||
});
|
||||
if (parseInt(uid, 10) > 0) {
|
||||
db.setAdd('group:' + groupName + ':pending', uid, callback);
|
||||
plugins.fireHook('action:groups.requestMembership', {
|
||||
groupName: groupName,
|
||||
uid: uid
|
||||
});
|
||||
} else {
|
||||
callback(new Error('[[error:not-logged-in]]'));
|
||||
}
|
||||
};
|
||||
|
||||
Groups.acceptMembership = function(groupName, uid, callback) {
|
||||
|
||||
Reference in New Issue
Block a user