I had no problem until now.
But today when i registered a user trough a custom user form, that worked perfectly before, they no longer log in.
After the registration, they are redirected to a page, but does not show they've logged in. I have forms/elements etc. that hide for logged-in users, and i thought the registration did not happened, but when i tried registering with the same credentials i got an error saying the user exists.
What could be the cause of that? They have no problem logging in trough elementor form.
I found a solution on my own and am sharing it here, since the threads with code no longer work
add_action('cred_save_data', 'auto_login_after_selected_forms', 10, 2);
function auto_login_after_selected_forms($user_id, $form_data) {
// List the IDs of the forms where auto-login should happen
$auto_login_form_ids = array(653, 1231); // Replace with your actual form IDs