can anyone help me? it is api for wordpress to infusionsoft =
i know the field users needs to be signups - but there is something else not working - if you are willing or can help please let me know!
can anyone help me? it is api for wordpress to infusionsoft =
i know the field users needs to be signups - but there is something else not working - if you are willing or can help please let me know!
this is the code - see, i switched it to signups - but i think the problem is it is calling the fiels ID, and there is no field ID in the signups table - anyone have suggestions?
$infusion_tag_id_value = get_option( 'tag_id' );
$theuser = $wpdb->get_row("SELECT * FROM {$wpdb->signups} WHERE user_login='{$username}'");
$email = $theuser->user_email;
$wp_user_num_id = $theuser->ID;
$usermeta = $wpdb->get_row("SELECT * FROM {$wpdb->usermeta} WHERE user_id='{$wp_user_num_id}' AND meta_key='wp_user_level'");
$wp_user_level = $usermeta->meta_value;
You can fetch the username and then use the following to get the ID:
$user_id = get_userdatabylogin( $username );
like this?
$theuser = $wpdb->get_row("SELECT * FROM {$wpdb->signups} WHERE user_login='{$username}'");
$email = $theuser->user_email;
$user_id = get_userdatabylogin( $username );
$wp_user_num_id = $user_id;
That should work.
No luck, there are 2 sections of code written specifically for wordpress and and not mu - anyone other ideas on how i can rewrite them for mu?
if ($_REQUEST['user_id'] != "" && $_REQUEST['user_id'] != NULL){
$being_updated = 1;
$theuser = $wpdb->get_row("SELECT * FROM {$wpdb->users} WHERE ID='{$_REQUEST['user_id']}'");
$original_email = $theuser->user_email;
}
AND
$theuser = $wpdb->get_row("SELECT * FROM {$wpdb->users} WHERE user_login='{$username}'");
$email = $theuser->user_email;
$wp_user_num_id = $theuser->ID;
$usermeta = $wpdb->get_row("SELECT * FROM {$wpdb->usermeta} WHERE user_id='{$wp_user_num_id}' AND meta_key='wp_user_level'");
$wp_user_level = $usermeta->meta_value;