Forums

Join
bbPress Support ForumsPluginsCustom text for password mail message

Info

Custom text for password mail message

  1. 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 \n\MyCustom 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!

  2. :(

    no one here with some advice on how to fix that?

    this kind of feature is important for every forum owner

  3. I'm adding filters to trunk now to allow customisation of these messages.

  4. Hello Sam,

    thanks for the response.

    I understand you right that without those filters it's not possible at the moment?

  5. Hello Sam,
    Excuse me I registered wouldn't send password should be in the mail settings where you have any questions ask how to modify?

  6. You must log in to post.