mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15: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) { | function renderRoute(name, req, res, next) { | ||||||
| 	getUserData(req, next, function (err, userData) { | 	async.waterfall([ | ||||||
| 		if (err || !userData) { | 		function (next) { | ||||||
| 			return next(err); | 			getUserData(req, next, next); | ||||||
|  | 		}, | ||||||
|  | 		function (userData) { | ||||||
|  | 			if (!userData) { | ||||||
|  | 				return next(); | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			if ((name === 'username' && userData['username:disableEdit']) || (name === 'email' && userData['email:disableEdit'])) { | 			if ((name === 'username' && userData['username:disableEdit']) || (name === 'email' && userData['email:disableEdit'])) { | ||||||
| 				return next(); | 				return next(); | ||||||
| 			} | 			} | ||||||
| @@ -99,7 +104,8 @@ function renderRoute(name, req, res, next) { | |||||||
| 			]); | 			]); | ||||||
|  |  | ||||||
| 			res.render('account/edit/' + name, userData); | 			res.render('account/edit/' + name, userData); | ||||||
| 	}); | 		}, | ||||||
|  | 	], next); | ||||||
| } | } | ||||||
|  |  | ||||||
| function getUserData(req, next, callback) { | function getUserData(req, next, callback) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user