Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,HoggeHog.
    I had the same problem and I found the solution.
    1-Add this lines in functions.php:

    add_filter ("retrieve_password_title", "sb_we_lost_password_title");
    add_filter ("retrieve_password_message", "sb_we_lost_password_message",10, 2);
    add_filter('wp_mail_content_type', create_function('$i', 'return "text/html";'), 1, 1);

    2-Replace this function in /wp-content/plugins/welcome-email-editor/sb_welcome_email_editor.php :

    function sb_we_lost_password_message($message, $key) {
    	global $wpdb;
    	$user_data = '';
    	if( ! isset( $_POST['user_login'] )  ){
          return '';
       }
       // Fetch user information from user_login
       if ( strpos( $_POST['user_login'], '@' ) ) {
    
          $user_data = get_user_by( 'email', trim( $_POST['user_login'] ) );
       } else {
          $login = trim($_POST['user_login']);
          $user_data = get_user_by('login', $login);
       }
       if( ! $user_data  ){
          return '';
       }
       $user_login = $user_data->user_login;
       $settings = get_option('sb_we_settings');
    
       if (trim($settings->password_reminder_body)) {
          $site_url = site_url();
    
          if ( is_multisite() ) $blogname = $GLOBALS['current_site']->site_name;
    		else $blogname = esc_html(get_option('blogname'), ENT_QUOTES);
    		$reset_url = network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login');
    		$message = $settings->password_reminder_body; //'Someone requested that the password be reset for the following account: [site_url]' . "\n\n" . 'Username: [user_login]' . "\n\n" . 'If this was a mistake, just ignore this email and nothing will happen.' . "\n\n" . 'To reset your password, visit the following address: [reset_url]';
    		$message = str_replace('[user_login]', $user_login, $message);
    		$message = str_replace('[blog_name]', $blogname, $message);
    		$message = str_replace('[site_url]', $site_url, $message);
    		$message = str_replace('[reset_url]', $reset_url, $message);
    	}
    	return $message;
    }

    The shortcode that you put into the mail content is [reset_url]
    Thats all. ??

    Thread Starter HoggeHog

    (@hoggehog)

    Hi Kede6!

    Thanks for taking the time to write this! ?? I tried it, but unfortunatley this made the plugin not send any emails at all.

    I’m hoping the plugin author will find time to look over these issues soon ??

    Thread Starter HoggeHog

    (@hoggehog)

    Hi again Kede6,

    It seems that your fix probably works on WP 4.3, but not on 4.3.1. Others are also having issues with emails not being sent on the latest version.

    Hi, I’m having same issue. Using WP 4.3.1 and plugin 4.4

    Hi,
    yesterday I was updated to 4.3.1 and the plugin run perfectly. I suggest you disable all plugins itself is any conflict with any of them. Tell me what is the result ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[reset_pass_url] shoing up instead of actual url’ is closed to new replies.