# Notification_Data_Access::get_for_user()

Get notifications for a user.

```php
get_for_user( int $user_id, int $page = 1, int $per_page = 20, bool $unread_only = false ): array
```

## Parameters

- `$user_id` (int) User ID.
- `$page` (int) Page number.
- `$per_page` (int) Per page.
- `$unread_only` (bool) Only unread notifications.

## Return

`array{notifications: object[], total: int, unread_count: int}`
