Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom text for password mail message


  • Olaf Lederer
    Participant

    @finalwebsites

    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!

Viewing 4 replies - 1 through 4 (of 4 total)

  • Olaf Lederer
    Participant

    @finalwebsites

    :(

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

    this kind of feature is important for every forum owner


    Sam Bauers
    Participant

    @sambauers

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


    Olaf Lederer
    Participant

    @finalwebsites

    Hello Sam,

    thanks for the response.

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

    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar