Fix the hook return object in the User.uploadProfileImageFromUrl socket

v1.18.x
MrWaffle 10 years ago
parent 78033dbf5c
commit 969c3a77cf

@ -199,13 +199,13 @@ SocketUser.uploadProfileImageFromUrl = function(socket, url, callback) {
return; return;
} }
plugins.fireHook('filter:uploadImage', {image: {url: url}, uid: socket.uid}, function(err, image) { plugins.fireHook('filter:uploadImage', {image: {url: url}, uid: socket.uid}, function(err, data) {
if (err) { if (err) {
return callback(err); return callback(err);
} }
user.setUserFields(socket.uid, {uploadedpicture: image.url, picture: image.url}, function(err) { user.setUserFields(socket.uid, {uploadedpicture: data.image.url, picture: data.image.url}, function(err) {
callback(err, image.url); callback(err, data.image.url);
}); });
}); });
}; };

Loading…
Cancel
Save