• Resolved Nik

    (@nikbond)


    Sorry me again!

    The Issue
    Our entire site, other than the home page, is membership only.
    Many of our members choose to pay by cheque/bank transfer (ie. manual payment – which works fine) HOWEVER at the end of the registration process, they are left logged in as users but still not members (until their payment is received).

    Of course, I realise I can still protect the rest of the site but this combination of being logged in but not yet a member is a confusing scenario.

    Questions therefore as follows –

    1. Is there a way I could automatically log the user out after registration? Perhaps by adding code to register.php?

    2. Also, is there any way of checking whether a user is a member? I’ve tried using something along the lines of – $member->has_membership( 123 ) but this throws an error – Call to undefined method MS_Model_Member::get_member.

    With many thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Laura – WPMU DEV Support

    (@wpmudev-support8)

    Hey @nikbond,

    Hope you’re well.

    For your first question; There is no feature for auto log out the user when registration complete. But there is a way to achieve that. You can create m2-registration-complete.php file in your theme and place in it whatever you want but at the end of file put this code;
    <?php wp_logout(); ?>

    Then after registration, your user will see that page and will be logged out already.

    For your second question, you can get member with this code;
    $member = MS_Model_Member::get_current_member();

    And you can find memberships with this code;
    $member->get_membership_ids();

    Also if you want you can get any membership with this code;
    $membership = MS_Factory::load( 'MS_Model_Membership', $membership_id );

    If you need any more help please don’t hesitate to ask 🙂

    Cheers,
    Oguz

    Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @nikbond

    Hope all is well!

    We’ve not heard from you in a while. I’ve marked this ticket as resolved for now, but if you need anything else at all, we’re here for you, please just reopen the ticket or create a new one.

    Have a good day and take care!

    Cheers,
    Nastia

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Registration Issues’ is closed to new replies.