mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	changing 'filter:register.check' hook signature to provide req, res and data
This commit is contained in:
		@@ -73,13 +73,12 @@
 | 
			
		||||
		var userData = {
 | 
			
		||||
			username: req.body.username,
 | 
			
		||||
			password: req.body.password,
 | 
			
		||||
			email: req.body.email,
 | 
			
		||||
			ip: req.ip
 | 
			
		||||
			email: req.body.email
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
		plugins.fireHook('filter:register.check', userData, function(err, userData) {
 | 
			
		||||
		plugins.fireHook('filter:register.check', req, res, userData, function(err, userData) {
 | 
			
		||||
			if (err) {
 | 
			
		||||
				return res.redirect(nconf.get('relative_path') + '/register');
 | 
			
		||||
				return res.redirect(nconf.get('relative_path') + '/register' + (err.message ? '?error=' + err.message : ''));
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			user.create(userData, function(err, uid) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user