WordPress.org

Ready to get started?Download WordPress

Forums

SB Welcome Email Editor
Please hook-up the lost password title and lost password message functions (10 posts)

  1. Faison
    Member
    Posted 11 months ago #

    Hi,

    I was trying to update the "Forgot my password" email, but nothing was changing. When I scanned your code, I found that the functions sb_we_lost_password_title and sb_we_lost_password_title were not being used at all. I'm not too sure how your plugin is supposed to be structured, but I just added the following code to the bottom of the function sb_we_init

    add_filter( 'retrieve_password_title', 'sb_we_lost_password_title' );
    add_filter( 'retrieve_password_message', 'sb_we_lost_password_message', 10, 2 );

    If you could hook up those functions to the proper filters in a way that follows your plugin's structure, that would be greatly appreciated.

    Thanks,
    Faison

    http://wordpress.org/plugins/welcome-email-editor/

  2. Jean-Philippe Côté
    Member
    Posted 10 months ago #

    Is this why the lost password message does not work ? In my setup, the registration message works fine but the forgotten message is not being used at all...

    Thanks for following up on it.

  3. Faison
    Member
    Posted 10 months ago #

    That's exactly why, cote.jp. So just open the plugin file for SB Welcome Email Editor, go the the function sb_we_init and add the code in my first post to the bottom of the function.

    Thanks,
    Faison

  4. Jean-Philippe Côté
    Member
    Posted 10 months ago #

    Thanks Faison. What I ended up doing is add the code to my own custom plugin. This way I don't have to fiddle directly with plugin or core code. Seems to be working fine. Thanks again for your help!

  5. Erikzzz
    Member
    Posted 8 months ago #

    }
    
    function sb_we_init() {
    	if (!$sb_we_settings = get_option('sb_we_settings')) {
    		$blog_name = get_option('blogname');
    
    		$sb_we_settings = new stdClass();
    		$sb_we_settings->user_subject = 'blog_name Your username and password';
    		$sb_we_settings->user_body = 'Username: [user_login]<br />Password: [user_password]<br />[login_url]';
    		$sb_we_settings->admin_subject = 'blog_name New User Registration';
    		$sb_we_settings->admin_body = 'New user registration on your blog ' . $blog_name . '<br /><br />Username: [user_login]<br />Email: [user_email]';
    		$sb_we_settings->admin_notify_user_id = 1;
    		$sb_we_settings->header_from_name = '';
    		$sb_we_settings->header_from_email = '[admin_email]';
    		$sb_we_settings->header_reply_to = '[admin_email]';
    		$sb_we_settings->header_send_as = 'html';
    		$sb_we_settings->header_additional = '';
    		$sb_we_settings->set_global_headers = 1;
    		$sb_we_settings->we_attachment_url = '';
    		$sb_we_settings->password_reminder_subject = 'blog_name Forgot Password';
    		$sb_we_settings->password_reminder_body = 'Someone requested that the password be reset for the following account: [site_url]<br /><br />Username: [user_login]<br /><br />If this was a mistake, just ignore this email and nothing will happen.<br /><br />To reset your password, visit the following address: [reset_url]';
    
    		add_option('sb_we_settings', $sb_we_settings);
    add_filter( 'retrieve_password_title', 'sb_we_lost_password_title' );
    add_filter( 'retrieve_password_message', 'sb_we_lost_password_message', 10, 2 );
    	}
    
    }
    
    function sb_we_set_email_filter_headers($reset=false)

    I put it in this way.. but nothing happens. what am I doing wrong?

  6. htown
    Member
    Posted 7 months ago #

    Erikzzz,

    Did you ever get it to work? I put in the code same as you and no difference.

    Many thanks,
    Houston

  7. staceppa
    Member
    Posted 7 months ago #

    hi
    i have this code

    function sb_we_init() {
    	if (!$sb_we_settings = get_option('sb_we_settings')) {
    		$blog_name = get_option('blogname');
    
    		$sb_we_settings = new stdClass();
    		$sb_we_settings->user_subject = 'blog_name Your username and password';
    		$sb_we_settings->user_body = 'Username: [user_login]<br />Password: [user_password]<br />[login_url]';
    		$sb_we_settings->admin_subject = 'blog_name New User Registration';
    		$sb_we_settings->admin_body = 'New user registration on your blog ' . $blog_name . '<br /><br />Username: [user_login]<br />Email: [user_email]';
    		$sb_we_settings->admin_notify_user_id = 1;
    		$sb_we_settings->header_from_name = '';
    		$sb_we_settings->header_from_email = '[admin_email]';
    		$sb_we_settings->header_reply_to = '[admin_email]';
    		$sb_we_settings->header_send_as = 'html';
    		$sb_we_settings->header_additional = '';
    		$sb_we_settings->set_global_headers = 1;
    		$sb_we_settings->we_attachment_url = '';
    		$sb_we_settings->password_reminder_subject = 'blog_name Forgot Password';
    		$sb_we_settings->password_reminder_body = 'Someone requested that the password be reset for the following account: [site_url]<br /><br />Username: [user_login]<br /><br />If this was a mistake, just ignore this email and nothing will happen.<br /><br />To reset your password, visit the following address: [reset_url]';
    
    		add_option('sb_we_settings', $sb_we_settings);
        add_filter( 'retrieve_password_title', 'sb_we_lost_password_title' );
        add_filter( 'retrieve_password_message', 'sb_we_lost_password_message', 10, 2 );
    	}
    
    }

    but i still get the standard message
    any clue?
    thanks!

  8. PowerMarketing
    Member
    Posted 6 months ago #

  9. mmontoni
    Member
    Posted 3 months ago #

    Hi,

    there is a bug with this fix. When a user tries to retrieve their lost password using the username instead of their email address the username is empty... can anyone give me a hand with this please?

    thanks,

  10. kuttab1973
    Member
    Posted 3 months ago #

    Hi... Thanks PowerMarketing for the fix.. Any chance that the HTML formatting was fixed. The email is sent without the [reset_url] as well which without it, a password reset can not be achieved. Thanks for your help

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.