Quote from: xwisdom at Jun 08, 2005, 04:16 PM
Thanks for the feedback. Try using the $modx->isMemberOfWebGroup() function
Yes, that would be OK for one or two queries. But the docgroups is put in the SESSION so the database doesn’t have to get hit at every page to see if the user has permission to view the page; likewise the usergroups being queried and loaded into SESSION once at login would relieve the database from being queried every time you need to check for any given usergroupl
This particular "webapp" snippet (docman) can get away with one query, but others could require being members of a number of groups, and it could require a check on several pages. So I still think having it in SESSION and only having to do an in_array() for each check is better than having to query the database every time.
Actually, I suppose this isn’t a bug, but more of a feature request!