|
|
|
@ -60,14 +60,17 @@ module.exports = {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
await db.delete('users:notvalidated');
|
|
|
|
|
await updatePrivilges();
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const cids = await db.getSortedSetRevRange('categories:cid', 0, -1);
|
|
|
|
|
const canChat = await privileges.global.canGroup('chat', 'registered-users');
|
|
|
|
|
async function updatePrivilges() {
|
|
|
|
|
// if email confirmation is required
|
|
|
|
|
// give chat, posting privs to "verified-users" group
|
|
|
|
|
// remove chat, posting privs from "registered-users" group
|
|
|
|
|
if (1 || meta.config.requireEmailConfirmation) {
|
|
|
|
|
if (meta.config.requireEmailConfirmation) {
|
|
|
|
|
const cids = await db.getSortedSetRevRange('categories:cid', 0, -1);
|
|
|
|
|
const canChat = await privileges.global.canGroup('chat', 'registered-users');
|
|
|
|
|
if (canChat) {
|
|
|
|
|
await privileges.global.give(['groups:chat'], 'verified-users');
|
|
|
|
|
await privileges.global.rescind(['groups:chat'], 'registered-users');
|
|
|
|
@ -89,5 +92,4 @@ module.exports = {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|