mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	style change
This commit is contained in:
		| @@ -70,10 +70,15 @@ editController.email = function (req, res, next) { | ||||
| }; | ||||
|  | ||||
| function renderRoute(name, req, res, next) { | ||||
| 	getUserData(req, next, function (err, userData) { | ||||
| 		if (err || !userData) { | ||||
| 			return next(err); | ||||
| 	async.waterfall([ | ||||
| 		function (next) { | ||||
| 			getUserData(req, next, next); | ||||
| 		}, | ||||
| 		function (userData) { | ||||
| 			if (!userData) { | ||||
| 				return next(); | ||||
| 			} | ||||
|  | ||||
| 			if ((name === 'username' && userData['username:disableEdit']) || (name === 'email' && userData['email:disableEdit'])) { | ||||
| 				return next(); | ||||
| 			} | ||||
| @@ -99,7 +104,8 @@ function renderRoute(name, req, res, next) { | ||||
| 			]); | ||||
|  | ||||
| 			res.render('account/edit/' + name, userData); | ||||
| 	}); | ||||
| 		}, | ||||
| 	], next); | ||||
| } | ||||
|  | ||||
| function getUserData(req, next, callback) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user