public function isDescendant($group = null) {
    if (is_numeric($group)) {
      $group = Group::factory((int) $group);
    }
    if (!isset($group->guid)) {
      return false;
    }
    // Check to see if the user is in a descendant group of the given group.
    if (isset($this->group->guid) && $this->group->isDescendant($group)) {
      return true;
    }
    foreach ((array) $this->groups as $curGroup) {
      if ($curGroup->isDescendant($group)) {
        return true;
      }
    }
    return false;
  }
public function isDescendant($group = null) {
    if (is_numeric($group)) {
      $group = Group::factory((int) $group);
    }
    if (!isset($group->guid)) {
      return false;
    }
    // Check to see if the user is in a descendant group of the given group.
    if (isset($this->group->guid) && $this->group->isDescendant($group)) {
      return true;
    }
    foreach ((array) $this->groups as $curGroup) {
      if ($curGroup->isDescendant($group)) {
        return true;
      }
    }
    return false;
  }
public function isDescendant ( $ group = null ) { if ( is_numeric ( $ group ) ) { $ group = Group :: factory ( ( int ) $ group ) ; } if ( ! isset ( $ group -> guid ) ) { return false ; } // Check to see if the user is in a descendant group of the given group. if ( isset ( $ this -> group -> guid ) && $ this -> group -> isDescendant ( $ group ) ) { return true ; } foreach ( ( array ) $ this -> groups as $ curGroup ) { if ( $ curGroup -> isDescendant ( $ group ) ) { return true ; } } return false ; }
Check whether the user is a descendant of a group.

@param mixed $group The group, or the group's GUID.
@return bool True or false.
Check whether the user is a descendant of a group .