fixed anon users visiting user profiles

v1.18.x
Baris Usakli 12 years ago
parent 2539079c84
commit 44f0183b29

@ -378,10 +378,11 @@ passport.deserializeUser(function(uid, done) {
data.joindate = utils.relativeTime(data.joindate);
data.age = new Date().getFullYear() - new Date(data.birthday).getFullYear();;
data.uid = uid;
callback({
yourid:req.user.uid,
theirid:uid,
user:data
yourid: (req.user)?req.user.uid : 0,
theirid: uid,
user: data
});
}
else

Loading…
Cancel
Save