Not exactly what you’re looking for but I don’t see a reason why you can’t use WordPress hooks to accomplish whatever you want to do. You could put it in a theme or plugin. For example, if we look at the wp_insert_user()
function, which is called whenever a new user is created, we have a few hooks to work with:
The wp_pre_insert_user_data
filter hook allows you to modify any user data before it’s inserted into the database.
The user_register
action hook allows you to fire additional actions right after a new user has registered to your website. For example:
/**
* Do XYZ after a new user registers.
*
* @param Integer $user_id
*
* @return void
*/
function wp13420698_user_registered( $user_id ) {
$user = get_user_by( 'ID', $user_id ); // User Object
// Do something with the userdata
error_log( $user->user_email );
error_log( $user->first_name );
// Get some other metadata
$additional_meta = get_user_meta( $usr_id, 'my_key', true );
// Call a function
my_function_call( $user );
// Create a new object
$thing = new Thing( $user );
// Trigger another action
do_action( 'my_user_registered_action', $user, $thing );
}
add_action(
'user_register', // Hook Name
'wp13420698_user_registered', // Callback
10, // Priority
1 // Arguments
);
Hopefully the above helps!