The user_group() function checks for a variable called group_id but it was initiated as group. I’m not sure which one of the two is wrong though but group_id made more sense since that is the name used for the field in the database.
Thanks. After making the changes you suggested, and updating the helper file, everything works just fine now.
I looked around in the library file before, perhaps maybe there was a typo, but I didn’t catch that. Good eye.