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?