X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fuser.php;h=d7c2b99111491cb5877402a231f008d804c48ae3;hb=c90dde9391588ae99bd1852fa1e95f32b016e013;hp=4626b85f181140fbd789b2e7b19e827333fff3b5;hpb=83040cf5d124f2437ad698422638fb433c217f06;p=platal.git diff --git a/classes/user.php b/classes/user.php index 4626b85..d7c2b99 100644 --- a/classes/user.php +++ b/classes/user.php @@ -1,6 +1,6 @@ _profile_fetched || $forceFetch) { $this->_profile_fetched = true; $this->_profile = Profile::get($this, $fields, $visibility); - } else if ($this->_profile !== null && !$this->_profile->visibility->equals($visibility)) { + } else if ($this->_profile !== null && $visibility !== null && !$this->_profile->visibility->equals($visibility)) { return Profile::get($this, $fields, $visibility); } return $this->_profile;