The other thing that you might need - depending on the the script - is to add U_Groups to the authenticate function - it's not called in every script.
If this is in the menubar, You might want to go into the authenticate() function in ubbt.inc.php and add U_Groups to the query there - so that $user['U_Groups'] will be avilable in every script.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.