Avoid showing user popup to non authenticated users if user is not a course teacher #security

pull/2821/head
Yannick Warnier 7 years ago
parent 13a8fbf516
commit e46377515f
  1. 8
      main/inc/ajax/user_manager.ajax.php

@ -60,7 +60,13 @@ switch ($action) {
$userData = '<h3>'.$user_info['complete_name'].'</h3>'.$user_info['mail'].$user_info['official_code'];
if ($isAnonymous) {
echo $userData;
// Only allow anonymous users to see user popup if the popup user
// is a teacher (which might be necessary to illustrate a course)
if ($user_info['status'] === COURSEMANAGER) {
echo $userData;
} else {
echo '<h3>-</h3>';
}
} else {
echo Display::url(
$userData,

Loading…
Cancel
Save