# Visibility::user_can_view_category()

Whether the viewer may see a published category (and forums grouped under it) on the front end.

```php
user_can_view_category( int $viewer_id, object $category ): bool
```

## Parameters

- `$viewer_id` (int) WordPress user ID (0 = guest).
- `$category` (object) Category row (`status` should be checked separately for drafts).

## Return

`bool`
