Check if user has group.

@param int $id
@return bool
431734
public function hasGroupId(int $id) : bool
    {
        $usergroups = $this->usergroups;

        foreach ($usergroups as $index => $usergroup) {
            if ($usergroup->group_id === $id) {
                return true;
            }
        }

        return false;
    }
1234066
protected function getGroup($id)
    {
        $group = $this->groupManager->findGroupBy(['id' => $id]);

        if (null === $group) {
            throw new NotFoundHttpException(sprintf('Group (%d) not found', $id));
        }

        return $group;
    }
522907
public function has($id) {
		if (! $this->connectionCheckStatus) {
			$this->addServer();
		}
		
		return $this->getClient()->get($this->prepareId($id)) !== false;
	}
810434
public static function isDismissed( $id ) {
		$dismissed = false;
		$id = sanitize_key( $id );

		// Get all of the notices this user has dismissed.
		$dismissals = get_user_meta( get_current_user_id(), 'boldgrid_dismissed_admin_notices' );

		// Loop through all of the dismissed notices. If we find our $id, then mark bool and break.
		foreach ( $dismissals as $dismissal ) {
			if ( $id === $dismissal['id'] ) {
				$dismissed = true;
				break;
			}
		}

		return $dismissed;
	}
1331998
public function has( $id ){
		if( $this->cache->has( $this->cacheKey.$id ) )
			return TRUE;
		return (bool) $this->get( $id );
	}
201245
public function has($id): bool
    {
        \assert(\is_scalar($id), 'Invalid format of the entry identifier.');

        return \array_key_exists($id, $this->values) || $this->hasInProxy($id);
    }
654312
public function has($id)
    {
        return isset($this->definitions[$id]) || isset($this->services[$id]);
    }
869307
public function IdExists($id)
    {
        $property = $this->getUserIdProperty();
        $user = User::where($property, "=", $id)->count();
        return $user === 0 ? false : true;
    }
1002298
public function hasParents($id)
    {
        if ($numOfParents = $this->getNumOfParents($id)) {
            return (bool)($numOfParents == 0 ? false : true);
        }

        return false;
    }
767748
public function has($id) {
		if (! isset($this->checkedIds[$id])) {
			$this->checkedIds[$id] = $this->hasService($id);
		}
		
		return $this->checkedIds[$id];
	}
637435
public function has($id) {
		if (isset($this->_definitions[$id])) {
			return true;
		}
		
		return $this->getLocatorByServiceId($id) !== null;
	}
16968
public function has($id)
    {
        $id = (string) $id;

        $this->validateName($id);

        return isset($this->items[$id]);
    }
1363117
public function iHaveUserGroupWithId( $id )
    {
        $name = $this->findNonExistingUserGroupName();

        $userGroup = $this->getUserGroupManager()->ensureUserGroupExists( $name );
        $this->addValuesToKeyMap( $id, $userGroup->id );
    }
267006
public function hasGroup(GroupInterface $group): bool
    {
        foreach ($this->groups as $my_group) {
            if ($group->isEqualTo($my_group)) {
                return true;
            }
        }

        return false;
    }
1356521
public function __isset($id) {
		if ($this->has($id)) {
			return true;
		}
		
		if ($this->hasLocator()) {
			$locator = $this->getLocator();
			
			if ($locator->has($id)) {
				return true;
			}
		}
		
		return false;
	}
166220
public function isChild($id)
    {
        foreach ($this->children as $childId => $child) {
            if ($id == $childId) {
                return true;
            }
        }

        return false;
    }
533086
public function hasGroup($name) {
    $group = App::make('group_repository')->findByName($name);
    $user = $this->getLoggedUser();

    if (!$user) {
      return false;
    }
    return $user->inGroup($group);
  }