Action hook gets user registration data after data is validated, but before new user is inserted.

All of the _data hooks can be used in a similar manner. The differences are if the user data has
been inserted or not. All of it has passed validation by the time it gets to the hook.

If the wpmem_pre_register_data hook is used to validate registration data, globalizing $wpmem_themsg and putting a value in it will halt the registration process and return the error message to the user.

Here is an example that will grab the user registration data before insertion, and echo the array
results on screen.

Note: this is ONLY an example to show the fields and data that are passed
with this hook; the call to exit(); will stop execution before this user data is inserted.


add_action( 'wpmem_pre_register_data', 'my_reg_hook' );

function my_reg_hook( $fields )
	// this example just outputs what is in the $fields
	// array so you can see what's in it, then it quits.
	echo "<pre>"; print_r( $fields ); echo "</pre>";
	// in a real, working use of this action, you can
	// do whatever you need to do with registration
	// data before it is inserted.  If that includes
	// validation, you can stop registration and return
	// an error message to the user by globalizing 
	// $wpmem_themsg and giving it your error message:
	// global $wpmem_themsg;
	// $wpmem_themsg = 'your error message...';


See a list of all filter and action hooks