Community Support Forums — WordPress® ( Users Helping Users ) — 2010-10-08T21:47:25-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=981 2010-10-08T21:47:25-05:00 http://www.primothemes.com/forums/viewtopic.php?t=981&p=3843#p3843 <![CDATA[{BUG} bbPress bridge]]>
After doing some digging here is the problem:
Around line 102:
Code:
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:
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 :)

Statistics: Posted by dethier — October 8th, 2010, 9:47 pm


]]>