I'm not filling out the SRF for this one since it's not really a problem, I need a customization.
What I would want to do is to add a criteria checking the status of a custom profile field, in order to send out a mass e-mail to that member or not. I still want it to check the standard field as well.
I've found the relevant SQL-query in acp_email that controls this:
Code: Select all
$sql = 'SELECT u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug WHERE ug.group_id = ' . $group_id . ' AND ug.user_pending = 0 AND u.user_id = ug.user_id AND u.user_allow_massemail = 1 AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') ORDER BY u.user_lang, u.user_notify_type';
I guess it should be something like
"AND pf.pf_news_from_us = 1"
But somehow the phpbb_profile_fields_data needs to be added to the query and also the user_id to be compared against that. That I'm not sure how to do.
Did I make myself understandable? Just ask if anything is unclear. And thanks for any help!