Hi @cobraeagle
You can use this filter hook to modify the email address on Registration:
um_add_user_frontend_submitted
e.g.
add_filter("um_add_user_frontend_submitted", function( $args ){
$args['user_email'] = $args['first_name'].".".$args['last_name']."@mail.com";
if ( email_exists( $args['user_email'] ) ) {
UM()->form()->add_error( 'first_name', __( 'Email already linked to another account', 'ultimate-member' ) );
}
return $args;
});
You will have issues when there are users with the same first and last name – they won’t be registered so you will have to modify the code snippet above to add a condition and display an error in the form.
Regards,