{BUG} bbPress bridge
Posted: October 8th, 2010, 9:47 pm
In testing I noticed that it didn't matter what you set as the minimum s2member level because as long as a person was a registered member (level) 0 they were able to get into the bbPress forums.
After doing some digging here is the problem:
Around line 102:
$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:
And that should work.
If you could fix this in an update that'd be great
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