Follow-up I3f03dd0100 (08adf46): simplify checks

Those variables are only used when $canViewPrivateInfo is true;
so no need set them when it is not the case

Change-Id: I87a27ea94f3eadc757b6e6048437a7ec58d09d03