PDA

View Full Version : Including User Profile Fields in New Thread Email


bitwise2000
03-26-2012, 07:59 PM
How can I include a field from the thread starter's profile in the new thread email (The email sent to the "Email Addresses to Notify When there is a New Thread")

We require a couple of custom user profile fields to be completed by the thread starter for threads in certain forums. I would like to include those in a the "thread started email" (which goes to mods on my forum) so that the mods can delete the thread if those fields are not completed.

Thanks

kh99
03-26-2012, 08:58 PM
Maybe try $bbuserinfo[fieldX] (where X is the field number of course).

bitwise2000
03-27-2012, 12:06 AM
Can anyone tell me what script generates the new thread email when that option is set for a forum? I believe I need to add the profile field to the query in that spot.

kh99
03-27-2012, 02:14 PM
I believe it's sent from function email_moderators() in includes/class_dm_threadpost.php. I guess you're finding that $bbuserinfo doesn't have that field at that point?

bitwise2000
03-30-2012, 11:54 AM
This was way simpler than I anticipated. $bbuserinfo does have the fields.

I just added the following to the email body phrase 'moderator'

$bbuserinfo[field5]
$bbuserinfo[field2]