latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Add new user data to External Database

Home Forums Community Forum Add new user data to External Database

This topic contains 0 replies, has 1 voice. Last updated by  Leonard Herndon 4 years ago.

Topic Author Topic
Posted: Friday Dec 28th, 2012 at 5:06 pm #35660

I am trying to figure out to add my own function to insert the customer data into an external database at the time of registration. I am currently using the custom form and fields created by s2member. I currently have my code in near this block inside of the wp-login.php. It seems that the custom registration doesn’t use this block of code.

$user_pass = wp_generate_password( 12, false);
	$user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email );
	if ( ! $user_id ) {
		$errors-&gt;add( 'registerfail', sprintf( __( '<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !' ), get_option( 'admin_email' ) ) );
		return $errors;
	} 
	//MY CODE
	else {
		include('wp-content/themes/Sterling/include/phpFunctions.php');
		msc_add_user($user_id, $sanitized_user_login, $user_email);
	}

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.