Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports.create_account = function(accountParms, cb)
- {
- console.log(accountParms);
- db.Account.findOne({'username' : accountParms.username}, function( err, user) {
- if(err) { cb(false, err, null); }
- if(user == null)
- {
- create_user(accountParms.email, accountParms.password, accountParms.nick, cb);
- }
- if(user != null && user.verified)
- {
- cb('Username in use!!', null);
- }
- else if(user != null && !user.verified)
- {
- cb('Please verified Yourself');
- }
- });
- }
- need more conditions of logic for login
Advertisement
Add Comment
Please, Sign In to add comment