I would like the Mailman Integration module to add any new user to a mailing list. I enabled Triggers and created an action in PHP. I then assigned the action to execute when a new user is created. I can not figure out how to get the $user object for this new user though. I can get the object of myself, the logged in user using global $user, but how do I get the new user?
$user = [newly added user]; $mail = $user->mail; $name = $user->name; $uid = $user->uid; $list_name = 'list'; mailman_integration_subscribe($list_name, $mail); mailman_integration_set_user_option($list_name, $mail, 'fullname', $name); mailman_integration_insert_users($list_name, $mail, 0, $uid);
I am not sure about how you've configured your environment but have you looked into this module? It appears to extend the rules a little bit.