mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	feat: throw error if uid is missing for update
This commit is contained in:
		| @@ -16,7 +16,9 @@ module.exports = function (User) { | |||||||
| 			'username', 'email', 'fullname', 'website', 'location', | 			'username', 'email', 'fullname', 'website', 'location', | ||||||
| 			'groupTitle', 'birthday', 'signature', 'aboutme', | 			'groupTitle', 'birthday', 'signature', 'aboutme', | ||||||
| 		]; | 		]; | ||||||
|  | 		if (!data.uid) { | ||||||
|  | 			throw new Error('[[error:invalid-update-uid]]'); | ||||||
|  | 		} | ||||||
| 		const updateUid = data.uid; | 		const updateUid = data.uid; | ||||||
|  |  | ||||||
| 		const result = await plugins.fireHook('filter:user.updateProfile', { uid: uid, data: data, fields: fields }); | 		const result = await plugins.fireHook('filter:user.updateProfile', { uid: uid, data: data, fields: fields }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user