Add email verification and notifications

This commit
- [x] Fixes the flash notice color (Trivial)
- [x] Adds flash message for user with no email.
- [x] Adds checks to see if user's email is verified, and displays corresponding notification.
- [x] Adds email templates.
This commit is contained in:
Mrugesh Mohapatra
2016-05-07 17:46:39 +05:30
parent bbacbd3d81
commit ff4dfb09da
8 changed files with 135 additions and 64 deletions

View File

@@ -19,6 +19,8 @@ import {
calcLongestStreak
} from '../utils/user-stats';
import { flashIfNotVerified } from '../utils/middleware';
const debug = debugFactory('fcc:boot:user');
const sendNonUserToMap = ifNoUserRedirectTo('/map');
const certIds = {
@@ -183,6 +185,7 @@ module.exports = function(app) {
router.get(
'/settings',
sendNonUserToMap,
flashIfNotVerified,
getSettings
);
router.get('/vote1', vote1);