PHPackages                             fof/online-users-widget - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fof/online-users-widget

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

fof/online-users-widget
=======================

Forum Widget That Lists Online Users

1.0.0(3mo ago)01.5k↓21.3%1[1 PRs](https://github.com/FriendsOfFlarum/online-users-widget/pulls)MITTypeScriptPHP ^8.2CI passing

Since Apr 12Pushed 3mo agoCompare

[ Source](https://github.com/FriendsOfFlarum/online-users-widget)[ Packagist](https://packagist.org/packages/fof/online-users-widget)[ Docs](https://friendsofflarum.org)[ Fund](https://opencollective.com/fof/donate)[ RSS](/packages/fof-online-users-widget/feed)WikiDiscussions 2.x Synced 1w ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

Online Users Widget
===================

[](#online-users-widget)

[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265) [![Latest Stable Version](https://camo.githubusercontent.com/691af2eec3342fa8f6936087178434c2ce14e7d20e66634cc99ee2b65b54d0cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666f662f6f6e6c696e652d75736572732d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fof/online-users-widget) [![Total Downloads](https://camo.githubusercontent.com/62bedcc42f4a25548bb985c54961fb1bdcb1e6af9dc61ef3c033a86285631667/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666f662f6f6e6c696e652d75736572732d7769646765742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/fof/online-users-widget)

A [Flarum](http://flarum.org) extension. Forum Widget That Lists Online Users.

[![flarum lan_ (3)](https://user-images.githubusercontent.com/20267363/127892981-e536c329-17bd-4ecf-ae5d-f295e26f8d1b.png)](https://user-images.githubusercontent.com/20267363/127892981-e536c329-17bd-4ecf-ae5d-f295e26f8d1b.png)

Note

This package was previously maintained as [`afrux/online-users-widget`](https://github.com/afrux/online-users-widget) by [@SychO9](https://github.com/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
------------

[](#installation)

This will also install [Forum Widgets Core](https://github.com/FriendsOfFlarum/forum-widgets-core) as it relies on it.

Install with composer:

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

### Migrating from `afrux/online-users-widget`

[](#migrating-from-afruxonline-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
--------

[](#updating)

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

flarum/realtime integration
---------------------------

[](#flarumrealtime-integration)

If [flarum/realtime](https://github.com/flarum/framework/tree/2.x/extensions/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
-----

[](#links)

- [Packagist](https://packagist.org/packages/fof/online-users-widget)
- [GitHub](https://github.com/FriendsOfFlarum/online-users-widget)
- [Discuss](https://discuss.flarum.org/d/39065)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance80

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

101d ago

Major Versions

1.x-dev → 2.0.0-beta.12026-04-12

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16573496?v=4)[IanM](/maintainers/imorland)[@imorland](https://github.com/imorland)

---

Top Contributors

[![SychO9](https://avatars.githubusercontent.com/u/20267363?v=4)](https://github.com/SychO9 "SychO9 (27 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (10 commits)")[![imorland](https://avatars.githubusercontent.com/u/16573496?v=4)](https://github.com/imorland "imorland (4 commits)")[![luceos](https://avatars.githubusercontent.com/u/504687?v=4)](https://github.com/luceos "luceos (1 commits)")

---

Tags

widgetUsersflarumonline

### Embed Badge

![Health badge](/badges/fof-online-users-widget/health.svg)

```
[![Health](https://phpackages.com/badges/fof-online-users-widget/health.svg)](https://phpackages.com/packages/fof-online-users-widget)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[fof/byobu

Well integrated, advanced private discussions.

59120.6k14](/packages/fof-byobu)[fof/forum-statistics-widget

Add a forum statistics widget to the sidenav section of your Flarum forum.

1030.7k1](/packages/fof-forum-statistics-widget)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1034.8k7](/packages/fof-discussion-language)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1938.7k](/packages/flarum-lang-french)[fof/masquerade

User profile builder extension for your Flarum forum.

2025.4k6](/packages/fof-masquerade)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
