XF 1.4 Run PHP Code For Certain Usergroup ID's Only?

How would I run a specific block of custom PHP code for certain usergroup ID's only? What would be the best way to achieve this?
Is there a documentation thread that shows the proper method and place within the admin panel to do this? It's my first day using the software, so forgive me if this is a basic question.