Set session variables on login


first of all i want to ask, if user register on my website and then his image link also gets inserted in my data
what if after registring user changes or delete his profile image?
what will happen then

iam denormalizing data so i want users name and imagename to be stored when session when he logs in
so that i can insert his name and image in collection

how can i do that

// alert(“logged in”);
var geo = Geolocation.latLng();
Session.set(‘geo’, geo);
//do your stuff‘updateUserLocation’,Meteor.userId(),Session.get(‘geo’));




how i have the code in proper formating, i tried single quote once and thrice, it doesnt work