[SOLVED] Mongo query showing wrong Profile Picture


#1

Hi,
I am stuck in a meteor related problem, could you help out please? Its a toy project.

Goal:
To create an app where users can come in and enter their data in a collection using a form, then upload their profile picture and then go on and view other users profiles.

Pkg Used:
cfs packages to upload a photo
aladeed: Autoform to upload the data.

Problem:
The image gets uploaded fine and I can show them too. But whenever a user tries to view other user’s profile, he sees his own picture rather than the users picture.

Any help is appreciated


#2

In your profilePicture helper you’re querying with Meteor.user(), which returns the currently logged in user document, instead of for the document of the user who’s profile you’re viewing.