[eluser]macigniter[/eluser]
thanks, phil!! you're so quick and detailed, just amazing.
i think that option #2 would be much easier and appropriate for the usage. since i will be looking up the group_id only once for authentication and then most probably store this value in the session it would be much easier to do it this way. there's not even a need to loop through it since i only need to look up the value for one specific combination of user and office.
whenever the group_id will be changed for a specific user/office combination it will be easy to do with the second approach.