fof/online-users-widget

Forum Widget That Lists Online Users

Maintainers

Package info

github.com/FriendsOfFlarum/online-users-widget

Homepage

Forum

Language:TypeScript

Type:flarum-extension

pkg:composer/fof/online-users-widget

Fund package maintenance!

Website

Statistics

Installs: 473

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.0-beta.2 2026-04-14 22:39 UTC

This package is auto-updated.

Last update: 2026-04-14 22:41:20 UTC


README

License Latest Stable Version Total Downloads

A Flarum extension. Forum Widget That Lists Online Users.

flarum lan_ (3)

Note

This package was previously maintained as afrux/online-users-widget by @SychO9. It has been transferred to FriendsOfFlarum and is now published as fof/online-users-widget. The composer.json replace field ensures existing installs upgrade transparently — no manual removal needed.

Installation

This will also install Forum Widgets Core as it relies on it.

Install with composer:

composer require fof/online-users-widget:"*"

Migrating from afrux/online-users-widget

If you currently have afrux/online-users-widget installed, run:

composer require fof/online-users-widget:"*"
composer remove afrux/online-users-widget
php flarum cache:clear

Updating

composer update fof/online-users-widget:"*" --with-dependencies
php flarum migrate
php flarum cache:clear

flarum/realtime integration

If flarum/realtime is installed, the widget automatically switches to live updates via the presence-online WebSocket presence channel. No configuration is required.

When realtime is active:

  • The widget updates instantly when users connect or disconnect, rather than reflecting a cached snapshot from page load.
  • All logged-in users are tracked via the presence channel, so the list stays accurate as people arrive and leave.
  • Users without the viewOnlineUsersWidget permission still join the presence channel (so they are visible to others) but the widget is not activated for them.

When realtime is not installed the widget falls back to the standard behaviour: the online users list is populated from the forum API payload on page load, cached server-side according to the configured TTL.

Note

The presence channel tracks active WebSocket connections, not last_seen_at. A user appears in the widget as soon as their browser connects and disappears as soon as their last tab closes, regardless of the configured "last seen interval" setting. The last seen interval setting only affects the fallback (non-realtime) behaviour.

A user with multiple tabs or browsers open counts as a single online user. They appear in the widget on their first connection and are removed only when all their connections close.

Links