mysite_menu_check

Definition

mysite_menu_check($access, $owner, $view)
mysite.module, line 1362

Description

Mullt-access control check, used in place of user_access() for some menu items.

Parameters

$access The default access status for this menu item. TRUE/FALSE

$owner Is the current user the owner of this collection. TRUE/FALSE

$view Does the current user have the 'view mysite' permission. TRUE/FALSE

Return value

TRUE or FALSE, where TRUE grants access.

Code

function mysite_menu_check($access, $owner, $view) {
  if ($owner) {
    $access = TRUE;
  }
  else if ($view && $access) {
    $access = TRUE;
  }
  else {
    $access = FALSE;
  }
  return $access;
}