Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created December 6, 2018 05:34
Show Gist options
  • Save andrewlimaza/794f6fd24b05cb6b0bde33610ff20a2a to your computer and use it in GitHub Desktop.
Save andrewlimaza/794f6fd24b05cb6b0bde33610ff20a2a to your computer and use it in GitHub Desktop.
SQL to get all users with active membership level.
SELECT users.*, members.membership_id, level.name
FROM wp_users AS users
JOIN wp_pmpro_memberships_users AS members
ON users.ID = members.user_id
JOIN wp_pmpro_membership_levels AS level
ON members.membership_id = level.id
WHERE members.status = 'active'
@tiicaa
Copy link

tiicaa commented Jun 8, 2020

Hello, how can I call this consultation or course by the identified user - sensei lms? I am using a professional paid subscription, and for your consultation can filter users from the same association, but this association wants to know which courses to complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment