MDL-48569 profile: show link to full profile if anybody can see it

This commit is contained in:
Marina Glancy 2014-12-11 11:34:42 +08:00
parent 8f06fffbe1
commit 0366b6fa72

View File

@ -389,7 +389,8 @@ if (isloggedin() && has_capability('moodle/site:sendmessage', $usercontext)
echo '</div>';
}
if ($currentuser || has_capability('moodle/user:viewdetails', $usercontext) || has_coursecontact_role($id)) {
if (empty($CFG->forceloginforprofiles) || $currentuser || has_capability('moodle/user:viewdetails', $usercontext)
|| has_coursecontact_role($id)) {
echo '<div class="fullprofilelink">';
echo html_writer::link($CFG->wwwroot.'/user/profile.php?id='.$id, get_string('fullprofile'));
echo '</div>';