X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fuser.php;h=e380dacde2037f0f7168675f85a0308b645a0228;hb=6c615821baef0daad2d1d8d7ef988be146da58e3;hp=4626b85f181140fbd789b2e7b19e827333fff3b5;hpb=83040cf5d124f2437ad698422638fb433c217f06;p=platal.git diff --git a/classes/user.php b/classes/user.php index 4626b85..e380dac 100644 --- a/classes/user.php +++ b/classes/user.php @@ -1,6 +1,6 @@ is_admin) { + if ($this->is_admin || $this->checkPerms('directory_hidden')) { $level = Visibility::VIEW_ADMIN; } elseif ($this->checkPerms('directory_private')) { $level = Visibility::VIEW_PRIVATE; @@ -363,7 +364,7 @@ class User extends PlUser if (!$this->_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; @@ -1107,5 +1108,5 @@ class UserIterator implements PlIterator } } -// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8: ?>