mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-53207' of https://github.com/dg711/moodle
This commit is contained in:
commit
d3c65e8c60
@ -1429,6 +1429,9 @@ function message_print_search_results($frm, $showicontext=false, $currentuser=nu
|
||||
// Load user-to record.
|
||||
if ($message->useridto !== $USER->id) {
|
||||
$userto = core_user::get_user($message->useridto);
|
||||
if ($userto === false) {
|
||||
$userto = core_user::get_noreply_user();
|
||||
}
|
||||
$tocontact = (array_key_exists($message->useridto, $contacts) and
|
||||
($contacts[$message->useridto]->blocked == 0) );
|
||||
$toblocked = (array_key_exists($message->useridto, $contacts) and
|
||||
@ -1442,6 +1445,9 @@ function message_print_search_results($frm, $showicontext=false, $currentuser=nu
|
||||
// Load user-from record.
|
||||
if ($message->useridfrom !== $USER->id) {
|
||||
$userfrom = core_user::get_user($message->useridfrom);
|
||||
if ($userfrom === false) {
|
||||
$userfrom = core_user::get_noreply_user();
|
||||
}
|
||||
$fromcontact = (array_key_exists($message->useridfrom, $contacts) and
|
||||
($contacts[$message->useridfrom]->blocked == 0) );
|
||||
$fromblocked = (array_key_exists($message->useridfrom, $contacts) and
|
||||
@ -1548,10 +1554,11 @@ 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.
|
||||
} else {
|
||||
// If not real user, then don't show any links.
|
||||
$userpictureparams['link'] = false;
|
||||
echo $OUTPUT->user_picture($USER, $userpictureparams);
|
||||
echo fullname($user);
|
||||
// Stock profile picture should be displayed.
|
||||
echo $OUTPUT->user_picture($user, $userpictureparams);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user