Skip to content

Commit

Permalink
MDL-52892 message: users' pic overrides others
Browse files Browse the repository at this point in the history
While listing the messages , the logged in users' profile pic used to
override over other users' pics .
  • Loading branch information
devang-gaur committed Feb 18, 2016
1 parent cf0ffe2 commit 800b8eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions message/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1438,11 +1438,7 @@ function message_print_user ($user=false, $iscontact=false, $isblocked=false, $i

if ($user === false) {
echo $OUTPUT->user_picture($USER, $userpictureparams);
} else if (core_user::is_real_user($user->id)) { // If not real user, then don't show any links.
$userpictureparams['link'] = false;
echo $OUTPUT->user_picture($USER, $userpictureparams);
echo fullname($user);
} else {
} else if (core_user::is_real_user($user->id)) {
echo $OUTPUT->user_picture($user, $userpictureparams);

$link = new moodle_url("/message/index.php?id=$user->id");
Expand All @@ -1462,6 +1458,10 @@ function message_print_user ($user=false, $iscontact=false, $isblocked=false, $i
} else {
message_contact_link($user->id, 'block', $return, $script, $includeicontext);
}
} else { // If not real user, then don't show any links.
$userpictureparams['link'] = false;
echo $OUTPUT->user_picture($USER, $userpictureparams);
echo fullname($user);
}
}

Expand Down

0 comments on commit 800b8eb

Please sign in to comment.