v1.18.x
barisusakli 10 years ago
parent b8028ccdbf
commit 21ad15b13a

@ -35,6 +35,10 @@ Groups.leave = function(socket, data, callback) {
return callback(new Error('[[error:invalid-data]]'));
}
if (socket.uid === parseInt(data.uid, 10) && data.groupName === 'administrators') {
return callback(new Error('[[error:cant-remove-self-as-admin]]'));
}
groups.leave(data.groupName, data.uid, callback);
};

Loading…
Cancel
Save