]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Can send messages to non-friends.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 19 Feb 2011 21:43:44 +0000 (21:43 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 19 Feb 2011 21:43:44 +0000 (21:43 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8351 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/messages/views/default/forms/messages/send.php

index db857b6f408f23312e79abd2fcefcbd489bd7647..c0a095993a766652d1ffeb76f552406d0a1dc96d 100644 (file)
@@ -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,