If this is a continuation of your attachment mod from another thread, it might have been smart to keep this question in there so users have all the information. In this particular case, you should just JOIN the user table in the attachment query to grab the username at the same time all the other info about the user is grabbed. It looks like the hook to use would be attachment_start. It's always best to take a look at the code around any hook you are using (in this case the attachment_display hook) and see what else is going on (I said that before in regards to finding the userid).
|