Hi @devpaq, @gb-design-studio,
There are no filters to disable the auto-login users after the registration process using Ultimate member. We need to log out users and redirect to any custom URL after registration.
Kindly paste the below code in your child themes functions.php file and let us know if it works or not.
add_action('um_registration_after_auto_login', 'nua_um_disable_auto_login');
function nua_um_disable_auto_login($user_id) {
if( !empty($user_id) && is_user_logged_in() ) {
wp_destroy_current_session();
wp_clear_auth_cookie();
wp_set_current_user( 0 );
}
}
add_action('um_after_form_fields', 'nua_um_redirect_to_after_registration');
function nua_um_redirect_to_after_registration() {
$redirect_after_registration = 'https://example.com';
?>
<input type="hidden" name="redirect_to" value="<?php echo $redirect_after_registration; ?>">
<?php
}
You can change the redirection URL in the $redirect_after_registration
variable.
Thanks