Hi @aoi0515
Thanks for writing in,
Please go to:
user-registration/includes/form/class-ur-form-field-user-email.php
and replace the lines from 50 t0 73 with the following code.
public function validation( $single_form_field, $form_data, $filter_hook, $form_id ) {
$email = isset( $form_data->value ) ? $form_data->value : '';
$status = is_email( $email );
if ( email_exists( $email ) ) {
// On multisite, ensure user exists on current site
if ( is_multisite() ) {
// assign user to blog and set their status to pending
$user_data = get_user_by( 'email', $email );
if ( $user_data && ! is_user_member_of_blog( $user_data->ID, get_current_blog_id() ) ) {
add_user_to_blog( get_current_blog_id(), $user_data->ID, 'customer' );
$user_manager = new UR_Admin_User_Manager( $user_data->ID );
$user_manager->save_status( $status, $alert_user=false );
} else {
$error='Email alaredy exists on this site.';
}
} else {
$error='Email alaredy exists.';
}
if($error)
add_filter(
$filter_hook,
function ( $msg ) {
return __( $error, 'user-registration' );
}
);
}
}
I hope this helps.
Thanks!