latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Calling user level via remote site/subdomain

Home Forums Community Forum Calling user level via remote site/subdomain

This topic contains 1 reply, has 2 voices. Last updated by  Bruce 4 years ago.

Topic Author Topic
Posted: Friday Dec 14th, 2012 at 2:41 am #34516
shane bos
Username: shanebos

I am trying to protect a software package located outside wordpress along with other WPMU sites within subdomains.

I need to retrieve user levels from these “remote sites” I am currently able to retrieve all WP data via the include once wp-load.php system and while I am able to restrict access based on if a user is logged in in or not, i need to pull the s2 membership level in order to allow access in that matter as well.

if (current_user_can(“access_s2member_level1”))

Works perfectly from within my main domain but once I include it in a subdomain it fails. It does work properly for the super admin user only but fails for any other user. My cookies are set to define(‘COOKIE_DOMAIN’, ‘.domain.com’); within the wp-config.php

I have exhausted my logic about how to grab this data, any help would be appreciated.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Friday Dec 14th, 2012 at 2:57 pm #34696
Bruce
Username: Bruce
Staff Member

Hi Shane,

You said that you are able to restrict access based on if the user is logged in or not?

If so, can you use get_current_user_id()?

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.