feat: account verification + mail config in admin area

This commit is contained in:
Nicolas Giard
2018-12-22 16:18:16 -05:00
parent 78ae137f48
commit 2b98a5f27a
16 changed files with 849 additions and 4 deletions

View File

@@ -19,7 +19,13 @@ module.exports = {
}).then((user) => {
if (user) {
return user.verifyPassword(uPassword).then(() => {
done(null, user)
if (!user.isActive) {
done(new WIKI.Error.AuthAccountBanned(), null)
} else if (!user.isVerified) {
done(new WIKI.Error.AuthAccountNotVerified(), null)
} else {
done(null, user)
}
}).catch((err) => {
done(err, null)
})