This topic has 3 replies, 3 voices, and was last updated 8 years by Radu.

  • Author
  • #123076
     suerobbins
    Participant

    Is there a way of forcing new registered users to pick an membership level. I read in one of the comments that you can provide a code.

     

    When I Register and activate my membership it is asking for an activation key? see attached screenshot

    #123157
     Radu
    Moderator
    You can use this function to redirect all users that not have any membership to this page, so the users will be "locked" in this page until they buy access
    add_action( 'template_redirect', 'my_membersip_restrict' );
     
    function my_membersip_restrict() {
        global $pmpro_pages, $post;
     
        if ( is_user_logged_in() && !pmpro_hasMembershipLevel() ) {
            if (isset($post->ID) && !in_array($post->ID, $pmpro_pages)) {
                wp_redirect( pmpro_url() );
            }
        }
    }
    
    The function should be added to wp-content/themes/kleo-child/functions.php Regarding the invalid key activation this is an odd issue, try to deactivate all plugins and enable it back... and enable first buddypress and try again and check again, an alternative to this is to disable email activation Possible solutions here : https://wordpress.org/support/topic/invalid-activation-key-error-in-buddypress-registration https://wordpress.org/support/topic/invalid-activation-key-message Cheers R.
    #158191
     Elijeh
    Participant
    Not marked as solution
    #158350
     Radu
    Moderator
    Not marked as solution
Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?