How to check existing membership in MySQL DB

I try to integrate a owncloud sync service to my members but want to restrict access to members only (actually a paid plan). What table in the db can be used to check the status of a member?

  • Alexander
    • DEV MAN’s Mascot

    Hi @Charltan,

    I'm not quite sure how this would work, but I'll get in touch with the plugin developer to see if he could offer some insight here.

    Thanks for being a WPMU DEV member. Let us know if we can be of any further assistance.
    Best regards,

  • Barry
    • DEV MAN’s Mascot

    The table is wp_m_membership_relationships but you can also use some of the functions that come with the plugin (in the includes/functions.php file) such as:

    current_user_is_member()

    current_user_has_subscription()
    current_user_on_subscription( $sub_id )
    current_user_on_level( $level_id )

  • Charltan
    • Site Builder, Child of Zeus

    @Barry
    Thanks! As the owncloud extension isn't part of WordPress, it seems I would have too many files imported to use the functions in functions.php. So, can I be sure that if a user exists in the wp_m_membership_relationships table it has subscribed as a member? Or will all users be listed there even after the membership has expired? So said: do I also have to check the expirydate field or not?

  • Charltan
    • Site Builder, Child of Zeus

    Great, so I already have a working version. Now my subscribed members can automatically sync shared files from their desktop computers! If anybody is interested in the combination of the membership plugin and owncloud, let me know and I will share my implementation.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.