Closed (fixed)
Project:
Privatemsg
Version:
5.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2007 at 14:42 UTC
Updated:
11 Sep 2007 at 00:21 UTC
I've just installed the latest version of this module to play with it.
In /privatemsg/contacts I see that the list of contacts has numerical IDs instead of the usernames. Is this a bug or is it intended to be like this? I would prefer to have the readable usernames instead of these numbers.
Comments
Comment #1
Lon commentedForgot one thing: I would also like the Contacts list to only show users from my buddylist who have enabled private messages in their profile.
Comment #2
Lon commentedSo another update: I see now that on the list of contacts I get a correct username when I've sent a PM to another user outside of my buddylist. The ones from my buddylist only get uid (numerical) names in the list of contacts, even the one I've sent PM to.
Comment #3
Joe Malik commented+1 on this
Comment #4
Lon commentedUpdate on the first issue (uid instead of name for the users from my buddylist): I think this is a bug.
Line 1646 in privatemsg.module (the version as of August 17) has
$contacts[check_plain($buddy->uid)] = $buddy->uid;
but I think it should be
$contacts[check_plain($buddy->name)] = $buddy->uid;
At least it seems to work fine. :)
Comment #5
Lon commentedAn to the second issue: I think this can be solved by changing in function privatemsg_contacts_form() from:
while ($buddy = db_fetch_object($result)) {
$contacts[check_plain($buddy->uid)] = $buddy->uid;
}
to
while ($buddy = db_fetch_object($result)) {
if (privatemsg_message_allowed($user->uid)) {
$contacts[check_plain($buddy->name)] = $buddy->uid;
}
}
Seems to work for me.
Comment #6
Lon commentedUhm... Think it should be
privatemsg_message_allowed($user->uid, $buddy->uid)
insted of
privatemsg_message_allowed($user->uid)
Comment #7
yngens commentedsubscribe
i also would prefer to show my buddies names in the list (instead of uid), nevertheless it would be great to somehow make them look different from others (bold, italic or other colors).
Comment #8
EnekoAlonso-1 commentedI agree, contacts list should show contacts name, not user id.
Also I think this contact table/list should be sortable and have more columns (information is power!):
isbuddy/isnotbuddy,
last message timestamp,
number of messages sent/received,
etc.
Comment #9
salvishttp://drupal.org/node/169836
Comment #10
(not verified) commented