summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--privatemsg.module10
1 files changed, 10 insertions, 0 deletions
diff --git a/privatemsg.module b/privatemsg.module
index a52c2a0..83935cc 100644
--- a/privatemsg.module
+++ b/privatemsg.module
@@ -458,6 +458,16 @@ function _privatemsg_form($message = 0) {
while ($name = db_fetch_object($result)) {
$contacts[] = check_plain($name->name);
}
+ if (module_exist('buddylist')) {
+ $result = db_query("SELECT u.name FROM {buddylist} b, {users} u WHERE b.buddy = u.uid AND b.uid = '%d'", $user->uid);
+ while ($name = db_fetch_object($result)) {
+ $buddyname = check_plain($name->name);
+ if (!in_array($buddyname, $contacts)) {
+ $contacts[] = $buddyname;
+ }
+ }
+ sort($contacts);
+ }
$form['quick'] = array(
'#type' => 'select',
'#options' => drupal_map_assoc($contacts),