From 257e2fa95b7959605f7349a561c5ade8620e765c Mon Sep 17 00:00:00 2001 From: brettp Date: Sat, 19 Feb 2011 21:43:44 +0000 Subject: Can send messages to non-friends. git-svn-id: http://code.elgg.org/elgg/trunk@8351 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/messages/views/default/forms/messages/send.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mod/messages/views/default/forms') 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, -- cgit v1.2.3