Forum Replies Created

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

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

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