WordPress.org

Support

Support » Plugins and Hacks » Please hook-up the lost password title and lost password message functions

Please hook-up the lost password title and lost password message functions

  • 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/

Viewing 9 replies - 1 through 9 (of 9 total)
  • 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.

    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

    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!

    }
    
    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?

    Erikzzz,

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

    Many thanks,
    Houston

    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!

    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,

    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

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Please hook-up the lost password title and lost password message functions’ is closed to new replies.