From 08d4d6b5bf8f18366696c9bba603e20cc9b602a9 Mon Sep 17 00:00:00 2001
From: Julian Lam <julian@designcreateplay.com>
Date: Tue, 14 Oct 2014 11:42:10 -0400
Subject: [PATCH] changed indentation for continueLogin method in
 authentication.js

---
 src/routes/authentication.js | 74 ++++++++++++++++++------------------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/src/routes/authentication.js b/src/routes/authentication.js
index 2378bec052..c405649f66 100644
--- a/src/routes/authentication.js
+++ b/src/routes/authentication.js
@@ -34,50 +34,50 @@
 
 	function login(req, res, next) {
 		var continueLogin = function() {
-			passport.authenticate('local', function(err, userData, info) {
-				if (err) {
-					req.flash('error', info);
-					return res.redirect(nconf.get('relative_path') + '/login');
-				}
-
-				if (!userData) {
-					if (typeof info === 'object') {
-						info = '[[error:invalid-username-or-password]]';
+				passport.authenticate('local', function(err, userData, info) {
+					if (err) {
+						req.flash('error', info);
+						return res.redirect(nconf.get('relative_path') + '/login');
 					}
 
-					req.flash('error', info);
-					return res.redirect(nconf.get('relative_path') + '/login');
-				}
-
-				// Alter user cookie depending on passed-in option
-				if (req.body.remember === 'on') {
-					var duration = 1000*60*60*24*parseInt(meta.config.loginDays || 14, 10);
-					req.session.cookie.maxAge = duration;
-					req.session.cookie.expires = new Date(Date.now() + duration);
-				} else {
-					req.session.cookie.maxAge = false;
-					req.session.cookie.expires = false;
-				}
-
-				req.login({
-					uid: userData.uid
-				}, function() {
-					if (userData.uid) {
-						user.logIP(userData.uid, req.ip);
+					if (!userData) {
+						if (typeof info === 'object') {
+							info = '[[error:invalid-username-or-password]]';
+						}
 
-						plugins.fireHook('action:user.loggedIn', userData.uid);
+						req.flash('error', info);
+						return res.redirect(nconf.get('relative_path') + '/login');
 					}
 
-					if (!req.session.returnTo) {
-						res.redirect(nconf.get('relative_path') + '/');
+					// Alter user cookie depending on passed-in option
+					if (req.body.remember === 'on') {
+						var duration = 1000*60*60*24*parseInt(meta.config.loginDays || 14, 10);
+						req.session.cookie.maxAge = duration;
+						req.session.cookie.expires = new Date(Date.now() + duration);
 					} else {
-						var next = req.session.returnTo;
-						delete req.session.returnTo;
-						res.redirect(nconf.get('relative_path') + next);
+						req.session.cookie.maxAge = false;
+						req.session.cookie.expires = false;
 					}
-				});
-			})(req, res, next);
-		};
+
+					req.login({
+						uid: userData.uid
+					}, function() {
+						if (userData.uid) {
+							user.logIP(userData.uid, req.ip);
+
+							plugins.fireHook('action:user.loggedIn', userData.uid);
+						}
+
+						if (!req.session.returnTo) {
+							res.redirect(nconf.get('relative_path') + '/');
+						} else {
+							var next = req.session.returnTo;
+							delete req.session.returnTo;
+							res.redirect(nconf.get('relative_path') + next);
+						}
+					});
+				})(req, res, next);
+			};
 
 		if(meta.config.allowLocalLogin !== undefined && parseInt(meta.config.allowLocalLogin, 10) === 0) {
 			return res.status(404).send('');