[eluser]Michael Wales[/eluser]
$rules is a class variable and the following line is referring to a local variable (a variable for that function only):
Code:
$input = userules_forinput($rules); // **** LINE WITH UNDEFINED ERROR for $rules
Change it to:
Code:
$input = userules_forinput($this->rules);