• Resolved Devgun

    (@devgun)


    First of all a good and very useful plugin, I must say.

    On my website only Admin can add new members/registration.
    So first of all Admin can’t open registration form because he is already logged in. I tried this fix Tutorial and is working fine as expected.
    But now problem is, right after admin register new user, admin is getting logout and newly created user is getting logged in automatically.
    I want newly registered user’s account “auto approve” without admin getting logout. I know this can be sorted out if setting is “awaiting for admin review” or “email verification”. But my requirement is new user created by Admin should be “auto approve” without admin getting auto logout from his dashboard.
    I believe this can be too done by adding something in functions.php. It will be kind if you suggest and help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Devgun

    (@devgun)

    So far tried this but none works in my case –

    add_action( 'um_user_register', 'my_user_register', 10, 2 );
    function my_user_register( $user_id, $args ) {
        um_fetch_user( $user_id );
        UM()->user()->approve();
    }

    And

    add_action( 'um_after_save_registration_details', 'my_after_save_registration_details', 10, 2 );
    function my_after_save_registration_details( $user_id, $submitted ) {
        um_fetch_user( $user_id );
        UM()->user()->approve();
    }

    Please suggest.

    Thread Starter Devgun

    (@devgun)

    OK, I got it after studying the plugin source code.
    You can mark this topic as resolved

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How an Admin can add/register new member from his side’ is closed to new replies.