<commit_before>'use strict';

/**
 * Module dependencies.
 */
var _ = require('lodash'),
	errorHandler = require('../errors.server.controller'),
	mongoose = require('mongoose'),
	passport = require('passport'),
	async = require('async'),
	config = require('../../../config/config'),
	nodemailer = require('nodemailer'),
	crypto = require('crypto'),
	User = mongoose.model('User');

var nev = require('email-verification')(mongoose);

// NEV setup and configuration ================
var config_nev = function () {

	var User = require('../../models/user.server.model');

	nev.configure({
	    persistentUserModel: User,
	    tempUserCollection: config.tempUserCollection,
	    expirationTime: 1800,  // 30 minutes

	    verificationURL: config.baseUrl+'/#!/verify/${URL}',
	    transportOptions: config.mailer.options,
	    verifyMailOptions: {
	        from: config.mailer.from,
	        subject: 'Confirm your account',
	        html: '<p>Please verify your account by clicking <a href="${URL}">this link</a>. If you are unable to do so, copy and ' +
	                'paste the following link into your browser:</p><p>${URL}</p>',
	        text: 'Please verify your account by clicking the following link, or by copying and pasting it into your browser: ${URL}'
	    },

	    confirmMailOptions: {
	        from: config.mailer.from,
	        subject: 'Account successfully verified!',
	        html: '<p>Your account has been successfully verified.</p>',
	        text: 'Your account has been successfully verified.'
	    },
	    verifySendMailCallback: function(err, info) {
	      if (err) {
	        throw err;
	      } else {
	        console.log(info);
	      }
	    }

	}, function(err, options){
		if(err) throw err;
		nev.generateTempUserModel(User);
	});
};

config_nev();

var smtpTransport = nodemailer.createTransport(config.mailer.options);<commit_msg>Fixed problem with nev callback<commit_after>'use strict';

/**
 * Module dependencies.
 */
var _ = require('lodash'),
	errorHandler = require('../errors.server.controller'),
	mongoose = require('mongoose'),
	passport = require('passport'),
	async = require('async'),
	config = require('../../../config/config'),
	nodemailer = require('nodemailer'),
	crypto = require('crypto'),
	User = mongoose.model('User');

var nev = require('email-verification')(mongoose);

// NEV setup and configuration ================
var config_nev = function () {

	var User = require('../../models/user.server.model');

	nev.configure({
	    persistentUserModel: User,
	    tempUserCollection: config.tempUserCollection,
	    expirationTime: 1800,  // 30 minutes

	    verificationURL: config.baseUrl+'/#!/verify/${URL}',
	    transportOptions: config.mailer.options,
	    verifyMailOptions: {
	        from: config.mailer.from,
	        subject: 'Confirm your account',
	        html: '<p>Please verify your account by clicking <a href="${URL}">this link</a>. If you are unable to do so, copy and ' +
	                'paste the following link into your browser:</p><p>${URL}</p>',
	        text: 'Please verify your account by clicking the following link, or by copying and pasting it into your browser: ${URL}'
	    },

	    confirmMailOptions: {
	        from: config.mailer.from,
	        subject: 'Account successfully verified!',
	        html: '<p>Your account has been successfully verified.</p>',
	        text: 'Your account has been successfully verified.'
	    },
	    verifySendMailCallback: function(err, info) {
	      if (err) {
	        throw err;
	      } else {
	        console.log(info);
	      }
	    }

	}, function(err, options){
		if(err) throw err;
		nev.generateTempUserModel(User, function(){
			return;
		});
	});
};

config_nev();

var smtpTransport = nodemailer.createTransport(config.mailer.options);
{'fraction_non_alphanumeric': 0.1523809523809524, 'fraction_numerical': 0.0031746031746031746, 'mean_word_length': 3.1779005524861876, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4822876', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1072, 'n_words': 287}