This question already has an answer here:
The way to pass by reference to a WP action is with:
do_action_ref_array('action_hook', array(&$data) );
do_action which is hooked using
add_action is not meant for altering values more then its meant for executing your function at a certain point. Instead use
apply_filter which is hooked using
add_filter which is meant to allow altering a value.