2022-05-30 21:08:07 +03:00
|
|
|
export function enableMembers(server) {
|
|
|
|
server.db.settings.find({key: 'members_signup_access'})
|
|
|
|
? server.db.settings.update({key: 'members_signup_access'}, {value: 'all'})
|
|
|
|
: server.create('setting', {key: 'members_signup_access', value: 'all', group: 'members'});
|
2022-08-25 13:17:14 +03:00
|
|
|
|
|
|
|
server.db.settings.find({key: 'members_enabled'})
|
|
|
|
? server.db.settings.update({key: 'members_enabled'}, {value: true})
|
|
|
|
: server.create('setting', {key: 'members_enabled', value: true, group: 'members'});
|
2022-05-30 21:08:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export function disableMembers(server) {
|
|
|
|
server.db.settings.find({key: 'members_signup_access'})
|
|
|
|
? server.db.settings.update({key: 'members_signup_access'}, {value: 'none'})
|
|
|
|
: server.create('setting', {key: 'members_signup_access', value: 'none', group: 'members'});
|
|
|
|
}
|