fof/user-directory
A Flarum extension that adds a customizable user directory and member list, with searchable profiles, filters, sorting, and user cards to help communities discover and browse members.
composer require fof/user-directory
php flarum cache:clear
Then enable User Directory in the admin Extensions tab.View user directory under the Permissions tab) and the extension settings (default sort, page size, whether suspended users are listed, whether the nav link is shown). Guests only see the directory if the permission is granted to the Guest group.extend.php and js/src/forum/ in the package. extend.php shows the registered route, the API controller overrides, and any settings/permission registration; the forum JS shows the list page component and how it queries /api/users./users as a member directory: grant the permission to Members (and optionally Guests), add the nav link in settings, and confirm the page renders in the same theme as the rest of the forum. From there the common next step is tuning what columns/sorts appear and who can see whom.$actor->can('fof-user-directory.view') (check the exact ability string in extend.php) before linking to the directory from custom pages, widgets, or emails. Keep the admin permission and your custom link logic in sync so you never link to a 403./api/users endpoint, so build URLs with query parameters (filter[q], group filters, sort, page[near]) and let the directory component hydrate from them. This is the cleanest way to add "Browse members in group X" or "Find a user" entry points from other extensions.extend()/override pattern on the directory page component to inject an extra filter control or a badge/column on each user card. Override the component's view/items method and call the parent, then mutate the vnode tree. This survives minor package updates far better than a fork.ApiController extender on the users index endpoint (and a matching filter on the User searcher) so the frontend filter you added maps to a real, paginated query rather than client-side filtering of a loaded page.User model used everywhere else, so badges, groups, online status, and avatar decorations generally flow through if those extensions extend the user model or the user card component. Test with them enabled rather than assuming..UserCard or discussion lists often miss it.username, joinedAt, lastSeenAt), and avoid adding filters that force full table scans. If you add a "random members" style feature, implement it with a bounded query, not ORDER BY RAND() over the whole user table.php flarum cache:clear; stale permission caches are the usual cause of "guests still see it" or "members get 403."/api/users endpoint. The directory page can render for guests while the underlying user list API still respects the user policy. If the page loads but is empty for guests, the problem is almost always the API-level visibility, not the page component.filter[q] matches usernames (and display names if nicknames are installed) according to the underlying searcher. If users report "search doesn't find me," check whether the field being searched is the one they expect, especially on forums using a separate display-name extension.noindex via your SEO extension; retrofitting this after Google has indexed the page is annoying.composer.json before bumping Flarum. Because the extension is small and low-traffic, an incompatible core release may land before the extension catches up — pin core and the extension together and test on staging.How can I help you explore Laravel packages today?