mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-03 16:31:59 +02:00
* Some code cleanup in user.js
* More work around user/groups
This commit is contained in:
parent
a7f9e3846e
commit
58746ca9a9
3 changed files with 54 additions and 187 deletions
|
@ -89,5 +89,12 @@ function addUserToGroups(userId, groups, cb) {
|
|||
}
|
||||
|
||||
function removeUserFromGroup(userId, groupId, cb) {
|
||||
|
||||
userDb.run(
|
||||
'DELETE FROM user_group_member ' +
|
||||
'WHERE group_id = ? AND user_id = ?;',
|
||||
[ groupId, userId ],
|
||||
function complete(err) {
|
||||
cb(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue