PHPackages                             nativefairie/userlisting - 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. nativefairie/userlisting

ActiveDrupal-module[Utility &amp; Helpers](/categories/utility)

nativefairie/userlisting
========================

Provides a block listing users from a third-party service.

02PHP

Since Mar 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/nativefairie/userlisting)[ Packagist](https://packagist.org/packages/nativefairie/userlisting)[ RSS](/packages/nativefairie-userlisting/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

UserListing Block - knowledge test
==================================

[](#userlisting-block---knowledge-test)

This contains a Drupal module that integrates with a third-party API to fetch and display dummyusers data in a block. The module provides functionality to list users retrieved from the Reqres.in dummy API in a paginated format, displaying their email address, forename, and surname. The labels of these fields are customisable within the block and the users are created as **dummyuser** content entity instances as soon as the block is placed in the region through an EventSubscriber. The dummy users have a *status* flag which excludes them from the block listing the users.

*NOTE: The purpose of this Drupal module is to test my Drupal knowledge but could serve as an example of implementing a pager in a custom drupal block or more.*

Task
----

[](#task)

- Create a Drupal module as a Composer package
- Integrate with the  dummy API
- Provide a block listing the users from the third party service
- Display email address, forename, and surname of users in the block
- Support configuration for:
    - Number of items per page
    - Email field label
    - Forename field label
    - Surname field label Expose an extension point for consumer to filter the list of users
- Include unit tests in the package
- May include integration and/or API tests.

Setup &amp; Steps
=================

[](#setup--steps)

1. Install this in a fully functional Drupal environment using composer:

    ```
    $composer require nativefairie/userlisting:*@dev

    ```
2. Enable the module:

    ```
    $drush en userlisting

    ```
3. Go to *"/admin/structure/block"* and place the Custom "User List" block, preferably in the "Content Below" area as the block only contains "dummy" styling.
4. On placement, the block form contains the **customisation of the labels**, as well as the **number of users shown per page**.

*IMPORTANT: When the button "Save" is pressed the users are fetched and inserted in our custom DummyUser content entity.*

5. Now, check out the result on the page where the block was placed.
6. Further, the users locally have a **"status"** flag that allows the admin to filter through the list of users, which will be reflected in the block listing.
7. To alter that, go to *"/admin/content/dummyuser"* and press the button *"edit"*. Toggle the status checkbox and notice upon refresh the block is updated accordingly.

*NOTE: When uninstalling the modules the entities created are not automatically removed using the hook\_module\_preuninstall() which is implemented in userlisting.module, this could be an improvement. Instead navigate to "/admin/modules/uninstall/entity/dummyuser" and remove them.*

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c1a16a6c313868d513009b20cb1acc104f832fb0725f217004d16e8a7209095b?d=identicon)[nativefairie](/maintainers/nativefairie)

---

Top Contributors

[![nativefairie](https://avatars.githubusercontent.com/u/32122929?v=4)](https://github.com/nativefairie "nativefairie (2 commits)")

### Embed Badge

![Health badge](/badges/nativefairie-userlisting/health.svg)

```
[![Health](https://phpackages.com/badges/nativefairie-userlisting/health.svg)](https://phpackages.com/packages/nativefairie-userlisting)
```

PHPackages © 2026

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