mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 12:36:02 +01:00 
			
		
		
		
	refactor user.create
dont fire filter:user.create if there userData is invalid
This commit is contained in:
		@@ -280,6 +280,19 @@ var async = require('async'),
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	UserNotifications.sendNameChangeNotification = function(uid, username) {
 | 
			
		||||
		notifications.create({
 | 
			
		||||
			bodyShort: '[[user:username_taken_workaround, ' + username + ']]',
 | 
			
		||||
			image: 'brand:logo',
 | 
			
		||||
			nid: 'username_taken:' + uid,
 | 
			
		||||
			datetime: Date.now()
 | 
			
		||||
		}, function(err, notification) {
 | 
			
		||||
			if (!err && notification) {
 | 
			
		||||
				notifications.push(notification, uid);
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	UserNotifications.pushCount = function(uid) {
 | 
			
		||||
		var websockets = require('./../socket.io');
 | 
			
		||||
		UserNotifications.getUnreadCount(uid, function(err, count) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user