• Resolved yst14

    (@yst14)


    I have setup my registration form to set new users as Subscribers.

    I have changed the subscriber role to review manual approval but after registering, you’re able to login without any admin approval

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter yst14

    (@yst14)

    just to add to this, the user status is empty and do not show in pending review.

    Thread Starter yst14

    (@yst14)

    In the database, the account_status key is ‘pending’ but in WordPRess Admin the status is empty and the UM Dashboard shows no users as pending

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @yst14

    How many user roles are assigned to newly registered users? If there’s more than 1, you need to set the Priority Number in the Role settings to set that Role as a Primary Role.

    Regards,

    Thread Starter yst14

    (@yst14)

    So, after much investigation I have found that upon registering, the users account_status is set to ‘pending’ when it should be set to ‘awaiting_admin_review’

    Thread Starter yst14

    (@yst14)

    Hi @champsupertramp only 1 user role is assigned

    Thread Starter yst14

    (@yst14)

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @yst14

    What UM version you’re using on your site?

    Regards,

    Thread Starter yst14

    (@yst14)

    Hi @champsupertramp

    I’m using 2.1.2 – updated this morning

    thanks

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @yst14

    Could you please try deactivating other plugins leaving UM activated? Let’s see if this is a conflict issue with other plugins.

    Regards,

    Thread Starter yst14

    (@yst14)

    Hi @champsupertramp

    I have found the cause which was a custom function in our theme related to redirecting the user after registration.

    – The user wasn unable to login which is correct
    – The user wasn’t redirected as per our admin settings

    The issue we had was the setting to redirect the user to a URL was not working in the plugin so we created the below

    /**
    * Redirect after registration
    **/
    add_action( 'um_registration_complete', 'iuk_registration_complete', 10, 2 );
    function iuk_registration_complete( $user_id, $args ) {
    
    	// Get the custom thank you page url from the theme settings
    	$url = get_field('registration_redirect_page', 'option');
    	// Redirect the user to the custom thank you page
    	wp_redirect( $url );
    	// Stop execution to prevent the page loading for any reason
    	exit;
    
    }

    Disabling this, it works fine but the redirect doesn’t work.

    So the next question is, how can we redirect the user to our given URL without breaking the user registration/approval?

    • This reply was modified 4 years, 11 months ago by yst14.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @yst14

    I’m not sure if I understood what you want to achieve – Could you please provide steps?

    Anyway, you can set the Redirection URL in the Register Options in the User Role settings:
    https://drive.google.com/file/d/1i5iGWPTpzybB5ZI-lxQWKCs2_jguw_je/view?usp=sharing

    Regards,

    Thread Starter yst14

    (@yst14)

    I do have a url in here. I removed it for the screenshot for privacy purposes.

    When completing the registration, the user is taken back to the registration form despite this being setup correctly.

    If I use the registration complete hook, the approval process breaks, as explained in previous comments.

    https://ibb.co/jJY12Sp

    Thread Starter yst14

    (@yst14)

    I’ve been looking at the request headers and I added some logging into the plugin to check and the plugin is redirecting to my homepage upon registration despite me setting a different URL within the Subscriber Role settings (priority 999)

    Thread Starter yst14

    (@yst14)

    The hidden form field on the registration form has the homepage url as the redirect_to value, not the value I set in the user role

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @yst14

    I just tested it in our testing sites and didn’t encounter the issue.

    Does this issue occur with a default WP theme and UM plugin only?

    Regards,

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Unapproved members able to login’ is closed to new replies.