• Resolved saga_shiftyblow

    (@saga_shiftyblow)


    Hi, it is possibile to disable auto-login after registration? I set a specific custom user role in Registration Options -> Registration Status to Auto-Approve (and redirect to a specific link) and it works, but after registration the user registered is automatically logged in. I would like to maintain auto-approve, but avoid auto-login.

    https://www.ads-software.com/plugins/ultimate-member/

Viewing 2 replies - 16 through 17 (of 17 total)
  • Hey guys, me too i need this feature.

    We are a coworking space and i have a team who register users from a frontend admin panel, and when they create a new user they automatically get login and switch their users for the new one they just created.

    Should be great just add a new option in the User Role settings with the auto-login.

    I solved leaving the ‘waiting for admin approval’ in the User Role then add this in functions.php

    add_action('um_post_registration_pending_hook', 'um_post_registration_approved', 20, 1);
    
    function um_post_registration_approved($user_id){
    	global $ultimatemember;
    
    	um_fetch_user( $user_id );
    
    	$ultimatemember->user->approve();
    }

    This will create the user and after all the validation process will force the approval without autologin in the user.

    • This reply was modified 7 years, 6 months ago by diegoleft.
Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘How to disable auto-login?’ is closed to new replies.