After doing some digging here is the problem:
Around line 102:
- Code: Select all
if (($wp_cap === "subscriber" && $min > 0) || ($level = preg_replace("/[^0-9]/", "", $wp_cap)) < $min)
$level will actually return 2 + the member level because within $wp_cap we have "s2member_level{lvl}". So the conditional test will ALWAYS let a registered member through.
An easy fix is to do this to get rid of the 2:
- Code: Select all
if (($wp_cap === "subscriber" && $min > 0) || ($level = preg_replace("/[^0-9]/", "", $wp_cap)-20) < $min)
And that should work.
If you could fix this in an update that'd be great