From 9fb219930362ca42a107c4d60fabb99bcddfd4ac Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 20 Oct 2006 05:14:12 +0000 Subject: [PATCH] Don't let people message the user account --- blocks/online_users/block_online_users.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blocks/online_users/block_online_users.php b/blocks/online_users/block_online_users.php index bd8dec262d3..697724ac123 100644 --- a/blocks/online_users/block_online_users.php +++ b/blocks/online_users/block_online_users.php @@ -97,7 +97,8 @@ class block_online_users extends block_base { $timeago = format_time(time() - max($user->timeaccess, $user->lastaccess)); //bruno to calculate correctly on frontpage $this->content->text .= print_user_picture($user->id, $COURSE->id, $user->picture, 16, true).' '; $this->content->text .= ''.$user->fullname.''; - if (!empty($USER->id) and ($USER->id != $user->id) and !empty($CFG->messaging) and !isguest()) { // Only when logged in + if (!empty($USER->id) and ($USER->id != $user->id) and !empty($CFG->messaging) and + !isguest() and $user->username != 'guest') { // Only when logged in and messaging active etc $this->content->text .= "\n".' ' .''. get_string('messageselectadd') .''; }