Based on the advice given below:
I have made an extension that does what I need it to do, however I need to restrict the permissions of the extension to certain users.
I have an event that handles when to render the given text and functions correctly and I have a reference to the user in question.
My main question is as follows:
How do I access php if the user is a moderator,admin, or has a certain access group? I tried looking it up in the general documentation and couldn't find it. If it's going to be write my own query to the DB that's fine, I'd just rather do the best practices.