Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ordavidil/11573f923d1078f8a044f68bb8908651 to your computer and use it in GitHub Desktop.
Save ordavidil/11573f923d1078f8a044f68bb8908651 to your computer and use it in GitHub Desktop.
// Access callback is being called as part of og_context_determine_context()
// calling menu_get_item(). However at this point there is no determined
// context, since it's the first time it is being called.
// In fact. this access callback is being called twice: First time from within
// og context attempts to get the current group ID. In that case, we return
// early, and let OG context finish its job.
// The second time this function will be called, the og_context_is_init()
// will return TRUE, thus we will perform the real access check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment