PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

When can custom capability be tested for?

s2Member Plugin. A Membership plugin for WordPress®.

When can custom capability be tested for?

Postby sruefer » May 2nd, 2011, 9:49 am

Hi,

I have a quick question concerning custom capabilities. I introduced the following access levels:

- Unregistered user (i.e. not registered at all)
- Level 0: free but registered
- Level 1: yearly payment
- Level 1 + custom capability "newsletter": yearly payment, different from Level 1

I am only running the site on my local machine for now, and I created test users for Level 0 and Level 1. I was not able to create a user for Level 1 + ccap="newsletter" (please advice on how to do that without actually going to Paypal), but I was testing for Level 1 + ccap="newsletter" for some pages and content. I noticed that nothing showed up for such tests.

Therefore I would like to check if I am correct in my assumption: an access level and/or custom capability can only be tested for if at least 1 user exists that has such access?

Thank you, kind regards,
Steffen
Steffen Ruefer | Using s2member with Paypal (none Pro) & WP 3.2.1 | http://rufer-design.com/
User avatar
sruefer
Experienced User
Experienced User
 
Posts: 25
Joined: April 25, 2011
Location: Dubai, UAE

Re: When can custom capability be tested for?

Postby Cristián Lávaque » May 2nd, 2011, 10:43 pm

You can't test the access as an admin yet, so you have to have a test user with such access to test it.

You can create your test user normally and add the ccap to his profile later, you'll notice a field for that in the last part of the page.

I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: When can custom capability be tested for?

Postby sruefer » May 3rd, 2011, 12:13 am

Yes it worked, I overlooked that field when trying to modify the user.

Thanks a lot for pointing it out!
Steffen
Steffen Ruefer | Using s2member with Paypal (none Pro) & WP 3.2.1 | http://rufer-design.com/
User avatar
sruefer
Experienced User
Experienced User
 
Posts: 25
Joined: April 25, 2011
Location: Dubai, UAE

Re: When can custom capability be tested for?

Postby Cristián Lávaque » May 3rd, 2011, 2:03 am

I'm glad it did. :)

Thanks for reporting back.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

cron