using recordset data in rules can be tricky.
the recordset needs to be created before the rule is created for the recordset value to be available.
this code at line 7 attaches the WA_SecurityAssist/Helper_PHP.php
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>
This also attaches the HelperGroupsRulesPHP.php and defines the access rules. Since this code is before the recordset code, the recordset value is not available when the rules are created.
you need to move the recordset code to be before the the require once line at line 7