aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/messages/views/default/forms/messages/send.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/mod/messages/views/default/forms/messages/send.php b/mod/messages/views/default/forms/messages/send.php
index db857b6f4..c0a095993 100644
--- a/mod/messages/views/default/forms/messages/send.php
+++ b/mod/messages/views/default/forms/messages/send.php
@@ -15,6 +15,13 @@ foreach ($vars['friends'] as $friend) {
$recipients_options[$friend->guid] = $friend->name;
}
+if (!array_key_exists($recipient_guid, $recipients_options)) {
+ $recipient = get_entity($recipient_guid);
+ if (elgg_instanceof($recipient, 'user')) {
+ $recipients_options[$recipient_guid] = $recipient->name;
+ }
+}
+
$recipient_drop_down = elgg_view('input/dropdown', array(
'name' => 'recipient_guid',
'value' => $recipient_guid,