Hi I am currently writing a few functions for various hooks such as
safecracker_submit_entry_end
entry_submission_ready
and I need to work out what member group the current user belongs to. So far to get the extension up and running I have been writing IF statements with hard coded ids like so
if($this->EE->session->userdata('group_id') == 5){ //do something }
Is there a standard way that people match users to member groups?