Hi,
I don’t like the standard message send after a new user has registered to my bbpress forum. So I thought about to write an plugin that will send my custom text instead.
This is what I have:
function bb_send_pass_cust($user, $pass) {
$message = __("Your username is: %1$s nYour password is: %2$s nYou can now log in: %3$s nMyCustom text!");
return bb_mail(
bb_get_user_email( $user->ID ),
bb_get_option('name') . ': ' . __('Password'),
sprintf($message, $user->user_login, $pass, bb_get_uri(null, null, BB_URI_CONTEXT_TEXT))
);
}
remove_action('bb_new_user', 'bb_send_pass');
add_action('bb_new_user', 'bb_send_pass_cust');
this code has many issues:
– it doesn’t remove the action
– the password is nu available in the custom function
In the past my functions/plugins never had function arguments, how to use them?
Thanks for your help!