bnoguchi/mongoose-auth

populate everyauth.user

rskuja opened this issue · 0 comments

Im using expres and i have defined extra param for user
houses: [{ type: Schema.ObjectId, ref: 'Property', required: false}]
now i would need to populate this by calling .populate('houses') and i need to do it for every page to my active user, so i could call everyauth.user.house[i].name for example in my views. So my question - where should correctly put this populate? If it wouldnt be needed in every page i would put it in my controller, but since its needed everywhere i would like to extend everyauth express helper.