X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fprofile.php;h=09937a35894e2540b3519c44234f6fa9a96a746e;hb=4dcee20be6bd4ca928c54a6ae580f832b287777e;hp=940af80866ddae224f8561d4f69c133d21f60d51;hpb=3796392e46bb793fcdbf6c67e4217f86355edcf0;p=platal.git diff --git a/modules/profile.php b/modules/profile.php index 940af80..09937a3 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -1,6 +1,6 @@ hasProfile()) { return PL_NOT_FOUND; } else { - $profile = $user->profile(); + $profile = $user->profile(false,0,Visibility::get(Visibility::VIEW_ADMIN)); } } else { - $profile = Profile::get($hrpid); + $profile = Profile::get($hrpid,0,Visibility::get(Visibility::VIEW_ADMIN)); } if (!$profile) { @@ -224,6 +224,8 @@ class ProfileModule extends PLModule } // Determines the access level at which the profile will be displayed. + // Note: VIEW_HIDDEN can NOT be selected. The admins who want to read + // information need to use the "edit profile" pages instead. if (Env::v('view') == 'public') { $view = Visibility::VIEW_PUBLIC; } else if (Env::v('view') == 'ax') { @@ -294,7 +296,7 @@ class ProfileModule extends PLModule if (!$user->ax_id) { $page->kill("Le matricule AX de {$user->hrid()} est inconnu"); } - http_redirect("http://www.polytechniciens.com/?page=AX_FICHE_ANCIEN&ancc_id=" . $user->ax_id); + http_redirect("http://kx.polytechniciens.com/?page=AX_FICHE_ANCIEN&ancc_id=" . $user->ax_id); } function handler_p_edit($page, $hrpid = null, $opened_tab = null, $mode = null, $success = null) @@ -516,6 +518,11 @@ class ProfileModule extends PLModule return PL_NOT_FOUND; } + // Referent view are logged. + if (S::logged()) { + S::logger()->log('view_referent', $pf->hrid()); + } + $page->assign_by_ref('profile', $pf); // Retrieves referents' countries. @@ -864,5 +871,5 @@ class ProfileModule extends PLModule } } -// 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: ?>