Newsletter Booster Problem

Discussion in 'WordPress' started by domokun, Nov 15, 2010.

  1. #1
    I've purchased the Newsletter Booster Plugin found here:

    http://cleverplugins.com/shop/all-software/newsletter-booster.html

    Im trying to integrate it with the MailChimp API.

    There are two places that the plugin can be used, within Comments and within User Registrations.

    Using the plugin with the comments seems to work well and the API integration is fine.

    My problem comes with using the plugin in conjunction with the User Registration page.

    It doesn't work and I believe it's because it's trying to pull values from database tables that don't exist.

    Here's the code

    		/**
    		* 
    		* registration_post()
    		* 
    		*/
    function registration_post($login) {
    		global $wpdb;
    		$sql = "SELECT 'user_email' FROM `$wpdb->users` WHERE `user_nicename` = '$login' limit 1;";
    		$user_email = mysql_query($sql);
    
    		$user_email =  $wpdb->get_var("SELECT `user_email` FROM `$wpdb->users` WHERE `user_nicename` = '$login' limit 1;");
    		$user_email = $wpdb->get_row("SELECT user_email FROM $wpdb->users WHERE `user_nicename` = '$login'");    					$user_email = print_r($user_email,true);
    		
    		$value=$wpdb->prepare($_POST['subscribe']);
    		$timestamp=$wpdb->get_var("SELECT user_registered FROM $wpdb->users WHERE `user_nicename` = '$login'");
    		$this->log("A new user registered, and also signed up to the newsletter: $login ($user_email) $user_id and value: '$value' with timestamp:'$timestamp'");
    
    		$this->store_signup('0','0',$login,$user_email,$ip);
    
    }
    //END registration_post() 
    Code (markup):
    The log created by the plugin outputs this when a user Registers

    I.e. the email address and timestamp aren't being pulled across.

    I've tried using the NB Support forums but after a week Im still getting no reply. I'll give a copy of the plugin to the first person that solves my problem.
     
    domokun, Nov 15, 2010 IP